mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-03 07:38:10 +00:00
Bluetooth: nokia: fix value check in nokia_bluetooth_serdev_probe()
[ Upstream commite8b5aed313
] 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:7bb318680e
("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>
This commit is contained in:
parent
ad0ab08c36
commit
604cacbff4
1 changed files with 5 additions and 1 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in a new issue