summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorYuanjun Gong <ruc_gongyuanjun@163.com>2023-07-26 21:30:00 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-09-23 10:48:00 +0200
commit604cacbff4f777af04dc4f08f2fe8a79aa749882 (patch)
treecea7a134d771a29948e8a7ff3b8a3637e13144aa /drivers
parentad0ab08c364ee36922cd50d8d7de83fd45fdf085 (diff)
downloadlinux-stable-604cacbff4f777af04dc4f08f2fe8a79aa749882.tar.gz
linux-stable-604cacbff4f777af04dc4f08f2fe8a79aa749882.tar.bz2
linux-stable-604cacbff4f777af04dc4f08f2fe8a79aa749882.zip
Bluetooth: nokia: fix value check in nokia_bluetooth_serdev_probe()
[ Upstream commit e8b5aed31355072faac8092ead4938ddec3111fd ] 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> Signed-off-by: Sasha Levin <sashal@kernel.org>
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 2dc33e65d2d0..5f6c6930b5bd 100644
--- a/drivers/bluetooth/hci_nokia.c
+++ b/drivers/bluetooth/hci_nokia.c
@@ -743,7 +743,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);