mirror of
https://github.com/torvalds/linux.git
synced 2026-06-07 05:55:44 +02:00
Bluetooth: hci_core: fix error handling in hci_register_dev()
[ Upstream commit0d75da38e0] If hci_register_suspend_notifier() returns error, the hdev and rfkill are leaked. We could disregard the error and print a warning message instead to avoid leaks, as it just means we won't be handing suspend requests. Fixes:9952d90ea2("Bluetooth: Handle PM_SUSPEND_PREPARE and PM_POST_SUSPEND") Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
b17b3203d4
commit
66324c5eb5
|
|
@ -2660,7 +2660,7 @@ int hci_register_dev(struct hci_dev *hdev)
|
|||
|
||||
error = hci_register_suspend_notifier(hdev);
|
||||
if (error)
|
||||
goto err_wqueue;
|
||||
BT_WARN("register suspend notifier failed error:%d\n", error);
|
||||
|
||||
queue_work(hdev->req_workqueue, &hdev->power_on);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user