diff options
author | Rahul Tanwar <rtanwar@maxlinear.com> | 2022-10-25 19:03:57 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-02-25 11:55:02 +0100 |
commit | 2da1f95085791ad8912dc4d9584e2ae003616662 (patch) | |
tree | eeb41267ffe38d2771ca2dcb756f787f837f6654 | |
parent | 1423d88753ed4cc9c2564a76ef0858b927dbc5a7 (diff) | |
download | linux-stable-2da1f95085791ad8912dc4d9584e2ae003616662.tar.gz linux-stable-2da1f95085791ad8912dc4d9584e2ae003616662.tar.bz2 linux-stable-2da1f95085791ad8912dc4d9584e2ae003616662.zip |
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>
-rw-r--r-- | drivers/clk/x86/clk-lgm.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/clk/x86/clk-lgm.c b/drivers/clk/x86/clk-lgm.c index 4de77b2c750d..f69455dd1c98 100644 --- a/drivers/clk/x86/clk-lgm.c +++ b/drivers/clk/x86/clk-lgm.c @@ -436,7 +436,7 @@ static int lgm_cgu_probe(struct platform_device *pdev) ctx->clk_data.num = CLK_NR_CLKS; ctx->membase = syscon_node_to_regmap(np); - if (IS_ERR_OR_NULL(ctx->membase)) { + if (IS_ERR(ctx->membase)) { dev_err(dev, "Failed to get clk CGU iomem\n"); return PTR_ERR(ctx->membase); } |