diff mbox series

Bluetooth: fix an error code in hci_register_dev()

Message ID YqCoJXuRV8MIDS2M@kili
State Accepted
Commit 9111786492f13501baf576b772c96bf0e4d5bbcb
Headers show
Series Bluetooth: fix an error code in hci_register_dev() | expand

Commit Message

Dan Carpenter June 8, 2022, 1:46 p.m. UTC
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>
---
 net/bluetooth/hci_core.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

patchwork-bot+bluetooth@kernel.org June 8, 2022, 5 p.m. UTC | #1
Hello:

This patch was applied to bluetooth/bluetooth-next.git (master)
by Marcel Holtmann <marcel@holtmann.org>:

On Wed, 8 Jun 2022 16:46:13 +0300 you wrote:
> 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>
> ---
>  net/bluetooth/hci_core.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)

Here is the summary with links:
  - Bluetooth: fix an error code in hci_register_dev()
    https://git.kernel.org/bluetooth/bluetooth-next/c/ad564394b3db

You are awesome, thank you!
diff mbox series

Patch

diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
index a4b4b3b927f2..dbddf891a4a9 100644
--- a/net/bluetooth/hci_core.c
+++ b/net/bluetooth/hci_core.c
@@ -2646,7 +2646,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);