summaryrefslogtreecommitdiffstats
path: root/arch/mips/ath79/clock.c
diff options
context:
space:
mode:
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>2016-10-30 09:25:46 +0100
committerRalf Baechle <ralf@linux-mips.org>2017-01-03 16:34:39 +0100
commit20d6f0c3e2832e98400cacf986aee9b6eeca65df (patch)
tree46b9f1c2e9d29a10591e7111b9285f793cf42a9f /arch/mips/ath79/clock.c
parentMIPS: SMP-CPS: Don't BUG if a CPU fails to start (diff)
downloadlinux-20d6f0c3e2832e98400cacf986aee9b6eeca65df.tar.xz
linux-20d6f0c3e2832e98400cacf986aee9b6eeca65df.zip
MIPS: ath79: Fix error handling
'clk_register_fixed_rate()' returns an error pointer in case of error, not NULL. So test it with IS_ERR. Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Acked-by: Aban Bedel <albeu@free.fr> Cc: antonynpavlov@gmail.com Cc: hackpascal@gmail.com Cc: amitoj1606@gmail.com Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Cc: kernel-janitors@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/14464/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/ath79/clock.c')
-rw-r--r--arch/mips/ath79/clock.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/mips/ath79/clock.c b/arch/mips/ath79/clock.c
index cc3a1e33a600..c1102cffe37d 100644
--- a/arch/mips/ath79/clock.c
+++ b/arch/mips/ath79/clock.c
@@ -45,7 +45,7 @@ static struct clk *__init ath79_add_sys_clkdev(
int err;
clk = clk_register_fixed_rate(NULL, id, NULL, 0, rate);
- if (!clk)
+ if (IS_ERR(clk))
panic("failed to allocate %s clock structure", id);
err = clk_register_clkdev(clk, id, NULL);