Commit 91117864 authored by Dan Carpenter's avatar Dan Carpenter Committed by Luiz Augusto von Dentz

Bluetooth: fix an error code in hci_register_dev()

Preserve the error code from hci_register_suspend_notifier().  Don't
return success.

Fixes: d6bb2a91f95b ("Bluetooth: Unregister suspend with userchannel")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
parent 4f17c2b6
......@@ -2647,7 +2647,8 @@ int hci_register_dev(struct hci_dev *hdev)
hci_sock_dev_event(hdev, HCI_DEV_REG);
hci_dev_hold(hdev);
if (hci_register_suspend_notifier(hdev))
error = hci_register_suspend_notifier(hdev);
if (error)
goto err_wqueue;
queue_work(hdev->req_workqueue, &hdev->power_on);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment