Re: [PATCH v3 RESEND 3/5] Bluetooth: btusb: fix wakeup source leak on probe failure

From: Johan Hovold

Date: Thu Jun 04 2026 - 02:42:03 EST


On Wed, Jun 03, 2026 at 02:06:08PM -0400, Luiz Augusto von Dentz wrote:
> On Wed, Jun 3, 2026 at 10:37 AM Johan Hovold <johan@xxxxxxxxxx> wrote:

> > @@ -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

Indeed. Sorry about that. I just sent a v4 addressing this here:

https://lore.kernel.org/lkml/20260604063740.2595260-1-johan@xxxxxxxxxx/

Johan