Skip to content

Commit 2097920

Browse files
SinkFinderbebarino
authored andcommitted
clk: clk-wm831x: fix a logic error
Fix bug https://bugzilla.kernel.org/show_bug.cgi?id=188561. Function wm831x_clkout_is_prepared() returns "true" when it fails to read CLOCK_CONTROL_1. "true" means the device is already prepared. So return "true" on the read failure seems improper. Signed-off-by: Pan Bian <[email protected]> Acked-by: Charles Keepax <[email protected]> Fixes: f05259a ("clk: wm831x: Add initial WM831x clock driver") Signed-off-by: Stephen Boyd <[email protected]>
1 parent 1221ae2 commit 2097920

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/clk/clk-wm831x.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ static int wm831x_clkout_is_prepared(struct clk_hw *hw)
243243
if (ret < 0) {
244244
dev_err(wm831x->dev, "Unable to read CLOCK_CONTROL_1: %d\n",
245245
ret);
246-
return true;
246+
return false;
247247
}
248248

249249
return (ret & WM831X_CLKOUT_ENA) != 0;

0 commit comments

Comments
 (0)