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

Bluetooth: btmtksdio: 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
ee3e4209 ba6535e8

+1 -1
+1 -1
drivers/bluetooth/btmtksdio.c
··· 1414 1414 */ 1415 1415 pm_runtime_put_noidle(bdev->dev); 1416 1416 1417 - err = device_init_wakeup(bdev->dev, true); 1417 + err = devm_device_init_wakeup(bdev->dev); 1418 1418 if (err) 1419 1419 bt_dev_err(hdev, "failed to initialize device wakeup"); 1420 1420