On Sun, Jan 07, 2018 at 08:16:32PM +0100, Lukas Wunner wrote: > @@ -406,8 +440,10 @@ static int bcm_close(struct hci_uart *hu) > device_init_wakeup(bdev->dev, false); > } > > - bcm_gpio_set_power(bdev, false); > - if (bdev->irq > 0) { > + err = bcm_gpio_set_power(bdev, false); > + if (err) { > + bt_dev_err(hu->hdev, "Failed to power down"); > + } else if (bdev->irq > 0) { > pm_runtime_disable(bdev->dev); > pm_runtime_set_suspended(bdev->dev); > } Hm, I realize I've botched this (again): If a valid IRQ was found but bcm_gpio_set_power() fails here, then the pm_runtime_enable() in bcm_request_irq() isn't balanced. :-( So pm_runtime_disable() needs to be called even if err != 0 (but only if bdev->irq > 0). Lukas -- To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html