clk: clk-atlas6: fix return value check in atlas6_clk_init()
authorXu Wang <vulab@iscas.ac.cn>
Mon, 13 Jul 2020 03:21:43 +0000 (03:21 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 21 Aug 2020 11:07:37 +0000 (13:07 +0200)
commit4bcf99f0ee88d9763bde1060edfb5262de9c7573
tree165f536699e7ec2d4afe529a956cc415547ab917
parent09144223f3e05955fac2f06bb7670f401e00451c
clk: clk-atlas6: fix return value check in atlas6_clk_init()

[ Upstream commit 12b90b40854a8461a02ef19f6f4474cc88d64b66 ]

In case of error, the function clk_register() returns ERR_PTR()
and never returns NULL. The NULL test in the return value check
should be replaced with IS_ERR().

Signed-off-by: Xu Wang <vulab@iscas.ac.cn>
Link: https://lore.kernel.org/r/20200713032143.21362-1-vulab@iscas.ac.cn
Acked-by: Barry Song <baohua@kernel.org>
Fixes: 7bf21bc81f28 ("clk: sirf: re-arch to make the codes support both prima2 and atlas6")
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/clk/sirf/clk-atlas6.c