* [PATCH -next] Bluetooth: hci_core: Fix error return code in hci_register_dev()
@ 2022-06-06 13:48 Yang Yingliang
2022-06-06 18:27 ` Abhishek Pandit-Subedi
2022-06-08 17:00 ` patchwork-bot+bluetooth
0 siblings, 2 replies; 3+ messages in thread
From: Yang Yingliang @ 2022-06-06 13:48 UTC (permalink / raw)
To: linux-kernel, netdev, linux-bluetooth; +Cc: marcel, abhishekpandit
If hci_register_suspend_notifier() fails, it should return error
code in hci_register_dev().
Fixes: d6bb2a91f95b ("Bluetooth: Unregister suspend with userchannel")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Yang Yingliang <yangyingliang@huawei.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.25.1
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH -next] Bluetooth: hci_core: Fix error return code in hci_register_dev()
2022-06-06 13:48 [PATCH -next] Bluetooth: hci_core: Fix error return code in hci_register_dev() Yang Yingliang
@ 2022-06-06 18:27 ` Abhishek Pandit-Subedi
2022-06-08 17:00 ` patchwork-bot+bluetooth
1 sibling, 0 replies; 3+ messages in thread
From: Abhishek Pandit-Subedi @ 2022-06-06 18:27 UTC (permalink / raw)
To: Yang Yingliang; +Cc: linux-kernel, netdev, linux-bluetooth, marcel
On Mon, Jun 6, 2022 at 6:38 AM Yang Yingliang <yangyingliang@huawei.com> wrote:
>
> If hci_register_suspend_notifier() fails, it should return error
> code in hci_register_dev().
>
> Fixes: d6bb2a91f95b ("Bluetooth: Unregister suspend with userchannel")
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Yang Yingliang <yangyingliang@huawei.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.25.1
>
Ah, I missed this. Good catch!
Acked-by: Abhishek Pandit-Subedi <abhishekpandit@chromium.org>
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH -next] Bluetooth: hci_core: Fix error return code in hci_register_dev()
2022-06-06 13:48 [PATCH -next] Bluetooth: hci_core: Fix error return code in hci_register_dev() Yang Yingliang
2022-06-06 18:27 ` Abhishek Pandit-Subedi
@ 2022-06-08 17:00 ` patchwork-bot+bluetooth
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+bluetooth @ 2022-06-08 17:00 UTC (permalink / raw)
To: Yang Yingliang
Cc: linux-kernel, netdev, linux-bluetooth, marcel, abhishekpandit
Hello:
This patch was applied to bluetooth/bluetooth-next.git (master)
by Marcel Holtmann <marcel@holtmann.org>:
On Mon, 6 Jun 2022 21:48:07 +0800 you wrote:
> If hci_register_suspend_notifier() fails, it should return error
> code in hci_register_dev().
>
> Fixes: d6bb2a91f95b ("Bluetooth: Unregister suspend with userchannel")
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
>
> [...]
Here is the summary with links:
- [-next] Bluetooth: hci_core: Fix error return code in hci_register_dev()
https://git.kernel.org/bluetooth/bluetooth-next/c/ad564394b3db
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [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-06 13:48 [PATCH -next] Bluetooth: hci_core: Fix error return code in hci_register_dev() Yang Yingliang
2022-06-06 18:27 ` Abhishek Pandit-Subedi
2022-06-08 17:00 ` 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