diff mbox series

[1/1] bluetooth: nokia: fix value check in nokia_bluetooth_serdev_probe()

Message ID 20230726133000.20417-1-ruc_gongyuanjun@163.com (mailing list archive)
State Accepted
Commit d5e8b6a140ecfb3f8fc3dff4189417620c1217de
Headers show
Series [1/1] bluetooth: nokia: fix value check in nokia_bluetooth_serdev_probe() | expand

Checks

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 fail "Bluetooth: " prefix is not specified in the subject
tedd_an/BuildKernel success BuildKernel PASS
tedd_an/CheckAllWarning success CheckAllWarning PASS
tedd_an/CheckSparse warning CheckSparse WARNING drivers/bluetooth/hci_nokia.c:284:23: warning: incorrect type in assignment (different base types)drivers/bluetooth/hci_nokia.c:284:23: expected unsigned short [usertype] bauddrivers/bluetooth/hci_nokia.c:284:23: got restricted __le16 [usertype]drivers/bluetooth/hci_nokia.c:287:26: warning: incorrect type in assignment (different base types)drivers/bluetooth/hci_nokia.c:287:26: expected unsigned short [usertype] sys_clkdrivers/bluetooth/hci_nokia.c:287:26: got restricted __le16 [usertype]
tedd_an/CheckSmatch success CheckSparse PASS
tedd_an/BuildKernel32 success BuildKernel32 PASS
tedd_an/TestRunnerSetup success TestRunnerSetup PASS
tedd_an/TestRunner_l2cap-tester success TestRunner PASS
tedd_an/TestRunner_iso-tester success TestRunner PASS
tedd_an/TestRunner_bnep-tester success TestRunner PASS
tedd_an/TestRunner_mgmt-tester success TestRunner PASS
tedd_an/TestRunner_rfcomm-tester success TestRunner PASS
tedd_an/TestRunner_sco-tester success TestRunner PASS
tedd_an/TestRunner_ioctl-tester success TestRunner PASS
tedd_an/TestRunner_mesh-tester success TestRunner PASS
tedd_an/TestRunner_smp-tester success TestRunner PASS
tedd_an/TestRunner_userchan-tester success TestRunner PASS
tedd_an/IncrementalBuild success Incremental Build PASS

Commit Message

Yuanjun Gong July 26, 2023, 1:30 p.m. UTC
in nokia_bluetooth_serdev_probe(), check the return value of
clk_prepare_enable() and return the error code if
clk_prepare_enable() returns an unexpected value.

Fixes: 7bb318680e86 ("Bluetooth: add nokia driver")
Signed-off-by: Yuanjun Gong <ruc_gongyuanjun@163.com>
---
 drivers/bluetooth/hci_nokia.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

Comments

bluez.test.bot@gmail.com July 26, 2023, 2 p.m. UTC | #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=769710

---Test result---

Test Summary:
CheckPatch                    PASS      0.61 seconds
GitLint                       PASS      0.28 seconds
SubjectPrefix                 FAIL      0.34 seconds
BuildKernel                   PASS      33.79 seconds
CheckAllWarning               PASS      36.59 seconds
CheckSparse                   WARNING   42.15 seconds
CheckSmatch                   PASS      112.52 seconds
BuildKernel32                 PASS      32.22 seconds
TestRunnerSetup               PASS      491.97 seconds
TestRunner_l2cap-tester       PASS      23.62 seconds
TestRunner_iso-tester         PASS      42.91 seconds
TestRunner_bnep-tester        PASS      10.72 seconds
TestRunner_mgmt-tester        PASS      217.72 seconds
TestRunner_rfcomm-tester      PASS      15.99 seconds
TestRunner_sco-tester         PASS      16.95 seconds
TestRunner_ioctl-tester       PASS      18.24 seconds
TestRunner_mesh-tester        PASS      13.47 seconds
TestRunner_smp-tester         PASS      14.40 seconds
TestRunner_userchan-tester    PASS      11.31 seconds
IncrementalBuild              PASS      30.25 seconds

Details
##############################
Test: SubjectPrefix - FAIL
Desc: Check subject contains "Bluetooth" prefix
Output:
"Bluetooth: " prefix is not specified in the subject
##############################
Test: CheckSparse - WARNING
Desc: Run sparse tool with linux kernel
Output:
drivers/bluetooth/hci_nokia.c:284:23: warning: incorrect type in assignment (different base types)drivers/bluetooth/hci_nokia.c:284:23:    expected unsigned short [usertype] bauddrivers/bluetooth/hci_nokia.c:284:23:    got restricted __le16 [usertype]drivers/bluetooth/hci_nokia.c:287:26: warning: incorrect type in assignment (different base types)drivers/bluetooth/hci_nokia.c:287:26:    expected unsigned short [usertype] sys_clkdrivers/bluetooth/hci_nokia.c:287:26:    got restricted __le16 [usertype]


---
Regards,
Linux Bluetooth
patchwork-bot+bluetooth@kernel.org July 27, 2023, 10:50 p.m. UTC | #2
Hello:

This patch was applied to bluetooth/bluetooth-next.git (master)
by Luiz Augusto von Dentz <luiz.von.dentz@intel.com>:

On Wed, 26 Jul 2023 21:30:00 +0800 you wrote:
> in nokia_bluetooth_serdev_probe(), check the return value of
> clk_prepare_enable() and return the error code if
> clk_prepare_enable() returns an unexpected value.
> 
> Fixes: 7bb318680e86 ("Bluetooth: add nokia driver")
> Signed-off-by: Yuanjun Gong <ruc_gongyuanjun@163.com>
> 
> [...]

Here is the summary with links:
  - [1/1] bluetooth: nokia: fix value check in nokia_bluetooth_serdev_probe()
    https://git.kernel.org/bluetooth/bluetooth-next/c/d5e8b6a140ec

You are awesome, thank you!
diff mbox series

Patch

diff --git a/drivers/bluetooth/hci_nokia.c b/drivers/bluetooth/hci_nokia.c
index 05f7f6de6863..97da0b2bfd17 100644
--- a/drivers/bluetooth/hci_nokia.c
+++ b/drivers/bluetooth/hci_nokia.c
@@ -734,7 +734,11 @@  static int nokia_bluetooth_serdev_probe(struct serdev_device *serdev)
 		return err;
 	}
 
-	clk_prepare_enable(sysclk);
+	err = clk_prepare_enable(sysclk);
+	if (err) {
+		dev_err(dev, "could not enable sysclk: %d", err);
+		return err;
+	}
 	btdev->sysclk_speed = clk_get_rate(sysclk);
 	clk_disable_unprepare(sysclk);