aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/clk/at91
diff options
context:
space:
mode:
authorVladimir Zapolskiy <vz@mleia.com>2016-03-08 01:41:29 +0200
committerStephen Boyd <sboyd@codeaurora.org>2016-04-15 16:57:09 -0700
commitcb0ceaf77d93964a0d00477c79f4499123f6159c (patch)
tree23f7da8eeb928896756cf78612a84363a1fb0918 /drivers/clk/at91
parentclk: xgene: Remove CLK_IS_ROOT (diff)
downloadlinux-dev-cb0ceaf77d93964a0d00477c79f4499123f6159c.tar.xz
linux-dev-cb0ceaf77d93964a0d00477c79f4499123f6159c.zip
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: Vladimir Zapolskiy <vz@mleia.com> Acked-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> Acked-by: Boris Brezillon <boris.brezillon@free-electrons.com> Fixes: bcc5fd49a0fd ("clk: at91: add a driver for the h32mx clock") Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Diffstat (limited to 'drivers/clk/at91')
-rw-r--r--drivers/clk/at91/clk-h32mx.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/clk/at91/clk-h32mx.c b/drivers/clk/at91/clk-h32mx.c
index 819f5842fa66..8e20c8a76db7 100644
--- a/drivers/clk/at91/clk-h32mx.c
+++ b/drivers/clk/at91/clk-h32mx.c
@@ -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;
}