Skip to content

Commit

Permalink
Bluetooth: nokia: fix value check in nokia_bluetooth_serdev_probe()
Browse files Browse the repository at this point in the history
[ Upstream commit e8b5aed ]

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: 7bb3186 ("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>
  • Loading branch information
AnnYugawa authored and gregkh committed Sep 13, 2023
1 parent c4cb61c commit 9246d93
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion drivers/bluetooth/hci_nokia.c
Expand Up @@ -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);

Expand Down

0 comments on commit 9246d93

Please sign in to comment.