summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorYuanjun Gong <ruc_gongyuanjun@163.com>2023-07-26 15:30:00 +0200
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2023-08-11 20:50:41 +0200
commite8b5aed31355072faac8092ead4938ddec3111fd (patch)
tree9688029013e73ad2aeaea5d1eee09b0916689fa0 /drivers
parentbluetooth: Explicitly include correct DT includes (diff)
downloadlinux-e8b5aed31355072faac8092ead4938ddec3111fd.tar.xz
linux-e8b5aed31355072faac8092ead4938ddec3111fd.zip
Bluetooth: nokia: fix value check in nokia_bluetooth_serdev_probe()
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> Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/bluetooth/hci_nokia.c6
1 files changed, 5 insertions, 1 deletions
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);