Bluetooth: hci_core: fix error handling in hci_register_dev()
Subsystems (2)
PATCH v3 1/1 Bluetooth: hci_core: fix error handling in hci_register_dev()
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.
---
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(-)
net/bluetooth/hci_core.c +1 -1
@@ -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);
Signature · 1 line
2.25.1
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
This patch was applied to bluetooth/bluetooth-next.git (master) by Luiz Augusto von Dentz <[email protected]>:
Hello:
This patch was applied to bluetooth/bluetooth-next.git (master) by Luiz Augusto von Dentz <[email protected]>:
Quoted 9 lines · 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 <[email protected]>[...]
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!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html