提交 20d6f0c3 编写于 作者: C Christophe JAILLET 提交者: Ralf Baechle

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: NChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Acked-by: NAban 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: NRalf Baechle <ralf@linux-mips.org>
上级 5b0093f3
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册