All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1] bluetooth: nokia: fix value check in nokia_bluetooth_serdev_probe()
@ 2023-07-26 13:30 Yuanjun Gong
  2023-07-26 14:00 ` [1/1] " bluez.test.bot
  2023-07-27 22:50 ` [PATCH 1/1] " patchwork-bot+bluetooth
  0 siblings, 2 replies; 3+ messages in thread
From: Yuanjun Gong @ 2023-07-26 13:30 UTC (permalink / raw)
  To: Marcel Holtmann, Johan Hedberg, Luiz Augusto von Dentz,
	linux-bluetooth
  Cc: Yuanjun Gong

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(-)

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);
 
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-07-27 22:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-26 13:30 [PATCH 1/1] bluetooth: nokia: fix value check in nokia_bluetooth_serdev_probe() Yuanjun Gong
2023-07-26 14:00 ` [1/1] " bluez.test.bot
2023-07-27 22:50 ` [PATCH 1/1] " patchwork-bot+bluetooth

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.