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

Bluetooth: btmrvl_sdio: Fix wakeup source leaks on device unbind

Device can be unbound or probe can fail, so driver must also release
memory for the wakeup source.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

authored by

Krzysztof Kozlowski and committed by
Luiz Augusto von Dentz
ba6535e8 689b5a80

+3 -1
+3 -1
drivers/bluetooth/btmrvl_sdio.c
··· 100 100 } 101 101 102 102 /* Configure wakeup (enabled by default) */ 103 - device_init_wakeup(dev, true); 103 + ret = devm_device_init_wakeup(dev); 104 + if (ret) 105 + return dev_err_probe(dev, ret, "Failed to init wakeup\n"); 104 106 } 105 107 } 106 108