1
0
Fork 0

clk: at91: Fix a return value in case of error

If 'clk_hw_register()' fails, it is likely that we expect to return an
error instead of a valid pointer (which would mean success).

Fix commit f5644f10dc ("clk: at91: Migrate to clk_hw based registration
and OF APIs")

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
steinar/wifi_calib_4_9_kernel
Christophe JAILLET 2016-09-25 13:53:58 +02:00 committed by Stephen Boyd
parent 5c6201e60a
commit 91bbc174d4
1 changed files with 1 additions and 1 deletions

View File

@ -203,7 +203,7 @@ at91_clk_register_programmable(struct regmap *regmap,
ret = clk_hw_register(NULL, &prog->hw);
if (ret) {
kfree(prog);
hw = &prog->hw;
hw = ERR_PTR(ret);
}
return hw;