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

Commit cb0ceaf7 authored by Vladimir Zapolskiy's avatar Vladimir Zapolskiy Committed by Stephen Boyd
Browse files

clk: at91: fix check of clk_register() returned value



The clk_register() function returns a valid pointer to struct clk or
ERR_PTR() error code, this makes a check for returned NULL value
useless and may lead to oops on error path.

Signed-off-by: default avatarVladimir Zapolskiy <vz@mleia.com>
Acked-by: default avatarAlexandre Belloni <alexandre.belloni@free-electrons.com>
Acked-by: default avatarBoris Brezillon <boris.brezillon@free-electrons.com>
Fixes: bcc5fd49 ("clk: at91: add a driver for the h32mx clock")
Signed-off-by: default avatarStephen Boyd <sboyd@codeaurora.org>
parent d31d56ec
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -114,7 +114,7 @@ static void __init of_sama5d4_clk_h32mx_setup(struct device_node *np)
	h32mxclk->regmap = regmap;

	clk = clk_register(NULL, &h32mxclk->hw);
	if (!clk) {
	if (IS_ERR(clk)) {
		kfree(h32mxclk);
		return;
	}