diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-02-06 10:33:30 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-02-06 10:33:30 +0300 |
commit | 924fb3ec50f5156d21e4f484358fb36f75b91ca8 (patch) | |
tree | f36b768432fe7f7c07b28857533e1bfe16006abe /drivers/usb/typec | |
parent | 4f6dfc2136fb2e8dc3f571a5caff6b6e88281fc0 (diff) | |
parent | 4ec5183ec48656cec489c49f989c508b68b518e3 (diff) | |
download | linux-924fb3ec50f5156d21e4f484358fb36f75b91ca8.tar.xz |
Merge 6.2-rc7 into usb-next
We need the USB fixes in here, and this resolves a merge conflict with
the i915 driver as reported in linux-next
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/typec')
-rw-r--r-- | drivers/usb/typec/ucsi/ucsi.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/usb/typec/ucsi/ucsi.c b/drivers/usb/typec/ucsi/ucsi.c index 00fc8672098f..f632350f6dcb 100644 --- a/drivers/usb/typec/ucsi/ucsi.c +++ b/drivers/usb/typec/ucsi/ucsi.c @@ -1400,6 +1400,9 @@ err_unregister: con->port = NULL; } + kfree(ucsi->connector); + ucsi->connector = NULL; + err_reset: memset(&ucsi->cap, 0, sizeof(ucsi->cap)); ucsi_reset_ppm(ucsi); @@ -1431,7 +1434,8 @@ static void ucsi_resume_work(struct work_struct *work) int ucsi_resume(struct ucsi *ucsi) { - queue_work(system_long_wq, &ucsi->resume_work); + if (ucsi->connector) + queue_work(system_long_wq, &ucsi->resume_work); return 0; } EXPORT_SYMBOL_GPL(ucsi_resume); @@ -1551,6 +1555,9 @@ void ucsi_unregister(struct ucsi *ucsi) /* Disable notifications */ ucsi->ops->async_write(ucsi, UCSI_CONTROL, &cmd, sizeof(cmd)); + if (!ucsi->connector) + return; + for (i = 0; i < ucsi->cap.num_connectors; i++) { cancel_work_sync(&ucsi->connector[i].work); ucsi_unregister_partner(&ucsi->connector[i]); |