diff options
author | Chuhong Yuan <hslester96@gmail.com> | 2019-11-15 14:25:15 +0800 |
---|---|---|
committer | Sebastian Reichel <sre@kernel.org> | 2019-12-19 01:07:53 +0100 |
commit | dd04defd11b78a73b302587575bbcda1019925d8 (patch) | |
tree | cab7067d19922fcc990005d01fa612da5f1e6d7b /drivers/power | |
parent | b0d0d3de246b1eda0b3050745848e78bbb15626b (diff) | |
download | lwn-dd04defd11b78a73b302587575bbcda1019925d8.tar.gz lwn-dd04defd11b78a73b302587575bbcda1019925d8.zip |
power: supply: pda_power: add missed usb_unregister_notifier
The driver forgets to unregister the notifier in remove.
Add the call to fix it.
Signed-off-by: Chuhong Yuan <hslester96@gmail.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Diffstat (limited to 'drivers/power')
-rw-r--r-- | drivers/power/supply/pda_power.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/power/supply/pda_power.c b/drivers/power/supply/pda_power.c index 3ae5707d39fa..03a37fd6be27 100644 --- a/drivers/power/supply/pda_power.c +++ b/drivers/power/supply/pda_power.c @@ -429,6 +429,10 @@ wrongid: static int pda_power_remove(struct platform_device *pdev) { +#if IS_ENABLED(CONFIG_USB_PHY) + if (!IS_ERR_OR_NULL(transceiver) && pdata->use_otg_notifier) + usb_unregister_notifier(transceiver, &otg_nb); +#endif if (pdata->is_usb_online && usb_irq) free_irq(usb_irq->start, pda_psy_usb); if (pdata->is_ac_online && ac_irq) |