* [PATCH v3] Bluetooth: hci_core: fix error handling in hci_register_dev()
@ 2022-10-20 2:16 Yang Yingliang
2022-10-20 3:46 ` [v3] " bluez.test.bot
2022-10-20 21:10 ` [PATCH v3] " patchwork-bot+bluetooth
0 siblings, 2 replies; 3+ messages in thread
From: Yang Yingliang @ 2022-10-20 2:16 UTC (permalink / raw)
To: linux-bluetooth
Cc: marcel, johan.hedberg, luiz.dentz, luiz.von.dentz, yangyingliang
If hci_register_suspend_notifier() returns error, the hdev and rfkill
are leaked. We could disregard the error and print a warning message
instead to avoid leaks, as it just means we won't be handing suspend
requests.
Fixes: 9952d90ea288 ("Bluetooth: Handle PM_SUSPEND_PREPARE and PM_POST_SUSPEND")
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
---
v2 -> v3:
print a warning message instead of goto err
v1 -> v2:
Add rfkill_destroy().
---
net/bluetooth/hci_core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
index 0540555b3704..9d9fb3dff22a 100644
--- a/net/bluetooth/hci_core.c
+++ b/net/bluetooth/hci_core.c
@@ -2660,7 +2660,7 @@ int hci_register_dev(struct hci_dev *hdev)
error = hci_register_suspend_notifier(hdev);
if (error)
- goto err_wqueue;
+ BT_WARN("register suspend notifier failed error:%d\n", error);
queue_work(hdev->req_workqueue, &hdev->power_on);
--
2.25.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* RE: [v3] Bluetooth: hci_core: fix error handling in hci_register_dev()
2022-10-20 2:16 [PATCH v3] Bluetooth: hci_core: fix error handling in hci_register_dev() Yang Yingliang
@ 2022-10-20 3:46 ` bluez.test.bot
2022-10-20 21:10 ` [PATCH v3] " patchwork-bot+bluetooth
1 sibling, 0 replies; 3+ messages in thread
From: bluez.test.bot @ 2022-10-20 3:46 UTC (permalink / raw)
To: linux-bluetooth, yangyingliang
[-- Attachment #1: Type: text/plain, Size: 1262 bytes --]
This is automated email and please do not reply to this email!
Dear submitter,
Thank you for submitting the patches to the linux bluetooth mailing list.
This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=686951
---Test result---
Test Summary:
CheckPatch PASS 1.41 seconds
GitLint PASS 1.02 seconds
SubjectPrefix PASS 0.69 seconds
BuildKernel PASS 42.72 seconds
BuildKernel32 PASS 37.57 seconds
Incremental Build with patchesPASS 58.28 seconds
TestRunner: Setup PASS 625.48 seconds
TestRunner: l2cap-tester PASS 19.61 seconds
TestRunner: iso-tester PASS 21.09 seconds
TestRunner: bnep-tester PASS 7.99 seconds
TestRunner: mgmt-tester PASS 122.80 seconds
TestRunner: rfcomm-tester PASS 12.63 seconds
TestRunner: sco-tester PASS 11.65 seconds
TestRunner: ioctl-tester PASS 12.91 seconds
TestRunner: mesh-tester PASS 10.05 seconds
TestRunner: smp-tester PASS 11.33 seconds
TestRunner: userchan-tester PASS 8.13 seconds
---
Regards,
Linux Bluetooth
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v3] Bluetooth: hci_core: fix error handling in hci_register_dev()
2022-10-20 2:16 [PATCH v3] Bluetooth: hci_core: fix error handling in hci_register_dev() Yang Yingliang
2022-10-20 3:46 ` [v3] " bluez.test.bot
@ 2022-10-20 21:10 ` patchwork-bot+bluetooth
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+bluetooth @ 2022-10-20 21:10 UTC (permalink / raw)
To: Yang Yingliang
Cc: linux-bluetooth, marcel, johan.hedberg, luiz.dentz,
luiz.von.dentz
Hello:
This patch was applied to bluetooth/bluetooth-next.git (master)
by Luiz Augusto von Dentz <luiz.von.dentz@intel.com>:
On Thu, 20 Oct 2022 10:16:56 +0800 you wrote:
> If hci_register_suspend_notifier() returns error, the hdev and rfkill
> are leaked. We could disregard the error and print a warning message
> instead to avoid leaks, as it just means we won't be handing suspend
> requests.
>
> Fixes: 9952d90ea288 ("Bluetooth: Handle PM_SUSPEND_PREPARE and PM_POST_SUSPEND")
> Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
>
> [...]
Here is the summary with links:
- [v3] Bluetooth: hci_core: fix error handling in hci_register_dev()
https://git.kernel.org/bluetooth/bluetooth-next/c/f334dabe7dae
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-10-20 21:10 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-10-20 2:16 [PATCH v3] Bluetooth: hci_core: fix error handling in hci_register_dev() Yang Yingliang
2022-10-20 3:46 ` [v3] " bluez.test.bot
2022-10-20 21:10 ` [PATCH v3] " patchwork-bot+bluetooth
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.