Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 91bbc174 authored by Christophe JAILLET's avatar Christophe JAILLET Committed by Stephen Boyd
Browse files

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 f5644f10 ("clk: at91: Migrate to clk_hw based registration
and OF APIs")

Signed-off-by: default avatarChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: default avatarStephen Boyd <sboyd@codeaurora.org>
parent 5c6201e6
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -203,7 +203,7 @@ at91_clk_register_programmable(struct regmap *regmap,
	ret = clk_hw_register(NULL, &prog->hw);
	ret = clk_hw_register(NULL, &prog->hw);
	if (ret) {
	if (ret) {
		kfree(prog);
		kfree(prog);
		hw = &prog->hw;
		hw = ERR_PTR(ret);
	}
	}


	return hw;
	return hw;