Commit e8b5aed3 authored by Yuanjun Gong's avatar Yuanjun Gong Committed by Luiz Augusto von Dentz

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: 7bb31868 ("Bluetooth: add nokia driver")
Signed-off-by: default avatarYuanjun Gong <ruc_gongyuanjun@163.com>
Signed-off-by: default avatarLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
parent e15f44fb
...@@ -734,7 +734,11 @@ static int nokia_bluetooth_serdev_probe(struct serdev_device *serdev) ...@@ -734,7 +734,11 @@ static int nokia_bluetooth_serdev_probe(struct serdev_device *serdev)
return err; 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); btdev->sysclk_speed = clk_get_rate(sysclk);
clk_disable_unprepare(sysclk); clk_disable_unprepare(sysclk);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment