summaryrefslogtreecommitdiff
path: root/net/bluetooth/hci_core.c
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2022-06-08 16:46:13 +0300
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2022-07-21 17:06:49 -0700
commit9111786492f13501baf576b772c96bf0e4d5bbcb (patch)
treeec39b84934571a9e59efeccb241a8e0cfb31e6d9 /net/bluetooth/hci_core.c
parent4f17c2b6694d0c4098f33b07ee3a696976940aa5 (diff)
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: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'net/bluetooth/hci_core.c')
-rw-r--r--net/bluetooth/hci_core.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
index 1ace311cdea9..94f38f669932 100644
--- a/net/bluetooth/hci_core.c
+++ b/net/bluetooth/hci_core.c
@@ -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);