clk: mxl: syscon_node_to_regmap() returns error pointers
authorRahul Tanwar <rtanwar@maxlinear.com>
Tue, 25 Oct 2022 11:03:57 +0000 (19:03 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 25 Feb 2023 11:06:43 +0000 (12:06 +0100)
commitd2edb20b003ee329d40252937ac48e19e67db737
tree2906c83d8179edea22c6c2a95cf21e4199da1dd1
parent04d31929df120e37be772a372862ed2ccaadd51b
clk: mxl: syscon_node_to_regmap() returns error pointers

[ Upstream commit 7256d1f4618b40792d1e9b9b6cb1406a13cad2dd ]

Commit 036177310bac ("clk: mxl: Switch from direct readl/writel based IO
to regmap based IO") introduced code resulting in below warning issued
by the smatch static checker.

  drivers/clk/x86/clk-lgm.c:441 lgm_cgu_probe() warn: passing zero to 'PTR_ERR'

Fix the warning by replacing incorrect IS_ERR_OR_NULL() with IS_ERR().

Fixes: 036177310bac ("clk: mxl: Switch from direct readl/writel based IO to regmap based IO")
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Rahul Tanwar <rtanwar@maxlinear.com>
Link: https://lore.kernel.org/r/49e339d4739e4ae4c92b00c1b2918af0755d4122.1666695221.git.rtanwar@maxlinear.com
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/clk/x86/clk-lgm.c