Message ID | 20220603012436.3332620-1-jiasheng@iscas.ac.cn (mailing list archive) |
---|---|
State | Accepted |
Commit | 822e1b3ca0fbb495bf2d316ca8e7d5eccc77577a |
Headers | show |
Series | [v2] Bluetooth: hci_intel: Add check for platform_driver_register | expand |
Context | Check | Description |
---|---|---|
tedd_an/pre-ci_am | success | Success |
tedd_an/checkpatch | success | Checkpatch PASS |
tedd_an/gitlint | success | Gitlint PASS |
tedd_an/subjectprefix | success | PASS |
tedd_an/buildkernel | success | Build Kernel PASS |
tedd_an/buildkernel32 | success | Build Kernel32 PASS |
tedd_an/incremental_build | success | Pass |
tedd_an/testrunnersetup | success | Test Runner Setup PASS |
tedd_an/testrunnerl2cap-tester | success | Total: 40, Passed: 40 (100.0%), Failed: 0, Not Run: 0 |
tedd_an/testrunnerbnep-tester | success | Total: 1, Passed: 1 (100.0%), Failed: 0, Not Run: 0 |
tedd_an/testrunnermgmt-tester | success | Total: 493, Passed: 493 (100.0%), Failed: 0, Not Run: 0 |
tedd_an/testrunnerrfcomm-tester | success | Total: 10, Passed: 10 (100.0%), Failed: 0, Not Run: 0 |
tedd_an/testrunnersco-tester | success | Total: 12, Passed: 12 (100.0%), Failed: 0, Not Run: 0 |
tedd_an/testrunnersmp-tester | success | Total: 8, Passed: 8 (100.0%), Failed: 0, Not Run: 0 |
tedd_an/testrunneruserchan-tester | success | Total: 4, Passed: 4 (100.0%), Failed: 0, Not Run: 0 |
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=647016 ---Test result--- Test Summary: CheckPatch PASS 1.28 seconds GitLint PASS 0.81 seconds SubjectPrefix PASS 0.65 seconds BuildKernel PASS 31.91 seconds BuildKernel32 PASS 28.40 seconds Incremental Build with patchesPASS 38.03 seconds TestRunner: Setup PASS 470.96 seconds TestRunner: l2cap-tester PASS 17.18 seconds TestRunner: bnep-tester PASS 6.01 seconds TestRunner: mgmt-tester PASS 101.15 seconds TestRunner: rfcomm-tester PASS 9.53 seconds TestRunner: sco-tester PASS 9.37 seconds TestRunner: smp-tester PASS 9.34 seconds TestRunner: userchan-tester PASS 6.27 seconds --- Regards, Linux Bluetooth
Hello: This patch was applied to bluetooth/bluetooth-next.git (master) by Marcel Holtmann <marcel@holtmann.org>: On Fri, 3 Jun 2022 09:24:36 +0800 you wrote: > As platform_driver_register() could fail, it should be better > to deal with the return value in order to maintain the code > consisitency. > > Fixes: 1ab1f239bf17 ("Bluetooth: hci_intel: Add support for platform driver") > Signed-off-by: Jiasheng Jiang <jiasheng@iscas.ac.cn> > > [...] Here is the summary with links: - [v2] Bluetooth: hci_intel: Add check for platform_driver_register https://git.kernel.org/bluetooth/bluetooth-next/c/822e1b3ca0fb You are awesome, thank you!
diff --git a/drivers/bluetooth/hci_intel.c b/drivers/bluetooth/hci_intel.c index 7249b91d9b91..78afb9a348e7 100644 --- a/drivers/bluetooth/hci_intel.c +++ b/drivers/bluetooth/hci_intel.c @@ -1217,7 +1217,11 @@ static struct platform_driver intel_driver = { int __init intel_init(void) { - platform_driver_register(&intel_driver); + int err; + + err = platform_driver_register(&intel_driver); + if (err) + return err; return hci_uart_register_proto(&intel_proto); }
As platform_driver_register() could fail, it should be better to deal with the return value in order to maintain the code consisitency. Fixes: 1ab1f239bf17 ("Bluetooth: hci_intel: Add support for platform driver") Signed-off-by: Jiasheng Jiang <jiasheng@iscas.ac.cn> --- Changelog: v1 -> v2 *Change 1. Change "iBluetooth" to "Bluetooth" in title. *Change 2. Change "ret" to "err" in code. --- drivers/bluetooth/hci_intel.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)