]> Git Repo - J-linux.git/commitdiff
clk: mxl: syscon_node_to_regmap() returns error pointers
authorRahul Tanwar <[email protected]>
Tue, 25 Oct 2022 11:03:57 +0000 (19:03 +0800)
committerStephen Boyd <[email protected]>
Thu, 27 Oct 2022 00:39:33 +0000 (17:39 -0700)
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 <[email protected]>
Signed-off-by: Rahul Tanwar <[email protected]>
Link: https://lore.kernel.org/r/49e339d4739e4ae4c92b00c1b2918af0755d4122.1666695221.git.rtanwar@maxlinear.com
Signed-off-by: Stephen Boyd <[email protected]>
drivers/clk/x86/clk-lgm.c

index 4de77b2c750d37c3ae7c31fd31fe407375e38559..f69455dd1c9802a04b4aa2a902e0fed946494a20 100644 (file)
@@ -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);
        }
This page took 0.05163 seconds and 4 git commands to generate.