public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Bluetooth: fix an error code in hci_register_dev()
@ 2022-06-08 13:46 Dan Carpenter
  2022-06-08 14:06 ` bluez.test.bot
  2022-06-08 17:00 ` [PATCH] " patchwork-bot+bluetooth
  0 siblings, 2 replies; 3+ messages in thread
From: Dan Carpenter @ 2022-06-08 13:46 UTC (permalink / raw)
  To: Marcel Holtmann, Abhishek Pandit-Subedi
  Cc: Johan Hedberg, Luiz Augusto von Dentz, Paolo Abeni,
	linux-bluetooth, kernel-janitors

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(-)

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);
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-06-08 17:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-06-08 13:46 [PATCH] Bluetooth: fix an error code in hci_register_dev() Dan Carpenter
2022-06-08 14:06 ` bluez.test.bot
2022-06-08 17:00 ` [PATCH] " patchwork-bot+bluetooth

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox