Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Chuhong Yuan and committed by
Sebastian Reichel
dd04defd b0d0d3de

+4
+4
drivers/power/supply/pda_power.c
··· 429 429 430 430 static int pda_power_remove(struct platform_device *pdev) 431 431 { 432 + #if IS_ENABLED(CONFIG_USB_PHY) 433 + if (!IS_ERR_OR_NULL(transceiver) && pdata->use_otg_notifier) 434 + usb_unregister_notifier(transceiver, &otg_nb); 435 + #endif 432 436 if (pdata->is_usb_online && usb_irq) 433 437 free_irq(usb_irq->start, pda_psy_usb); 434 438 if (pdata->is_ac_online && ac_irq)