Re: [PATCH v3 RESEND 3/5] Bluetooth: btusb: fix wakeup source leak on probe failure
From: Luiz Augusto von Dentz
Date: Wed Jun 03 2026 - 14:15:49 EST
Hi Johan,
On Wed, Jun 3, 2026 at 10:37 AM Johan Hovold <johan@xxxxxxxxxx> wrote:
>
> Make sure to disable wakeup on probe failure to avoid leaking the wakeup
> source.
>
> Fixes: fd913ef7ce61 ("Bluetooth: btusb: Add out-of-band wakeup support")
> Cc: stable@xxxxxxxxxxxxxxx # 4.11
> Cc: Rajat Jain <rajatja@xxxxxxxxxx>
> Signed-off-by: Johan Hovold <johan@xxxxxxxxxx>
> ---
> drivers/bluetooth/btusb.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
> index d0a83a1ffdf2..622df2fff497 100644
> --- a/drivers/bluetooth/btusb.c
> +++ b/drivers/bluetooth/btusb.c
> @@ -4181,7 +4181,7 @@ static int btusb_probe(struct usb_interface *intf,
> if (id->driver_info & BTUSB_MARVELL && data->oob_wake_irq) {
> err = marvell_config_oob_wake(hdev);
> if (err)
> - goto out_free_dev;
> + goto err_disable_wakeup;
> }
> #endif
> if (id->driver_info & BTUSB_CW6622)
> @@ -4427,6 +4427,9 @@ static int btusb_probe(struct usb_interface *intf,
> }
> err_kill_tx_urbs:
> usb_kill_anchored_urbs(&data->tx_anchor);
> +err_disable_wakeup:
> + if (data->oob_wake_irq)
> + device_init_wakeup(&data->udev->dev, false);
> out_free_dev:
> if (data->reset_gpio)
> gpiod_put(data->reset_gpio);
> --
> 2.53.0
This seem to trigger a compilation problem according to sashiko:
The goto statement targeting err_disable_wakeup is wrapped in an ifdef
CONFIG_PM block earlier in the function, but this label is defined
unconditionally here.
[]https://sashiko.dev/#/patchset/20260603143643.2514595-1-johan%40kernel.org
--
Luiz Augusto von Dentz