public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/1] clk: mxl: Fix smatch static checker warning
@ 2022-10-25 11:03 Rahul Tanwar
  2022-10-25 11:03 ` [PATCH 1/1] " Rahul Tanwar
  0 siblings, 1 reply; 3+ messages in thread
From: Rahul Tanwar @ 2022-10-25 11:03 UTC (permalink / raw)
  To: sboyd, dan.carpenter, linux-clk, yzhu
  Cc: linux-kernel, linux-lgm-soc, Rahul Tanwar

Fix the static checker warning reported by Dan Carpenter.

The patch is created on top of clk-next branch of below clk git tree:
git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux.git clk-next

Rahul Tanwar (1):
  clk: mxl: Fix smatch static checker warning

 drivers/clk/x86/clk-lgm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

-- 
2.17.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH 1/1] clk: mxl: Fix smatch static checker warning
  2022-10-25 11:03 [PATCH 0/1] clk: mxl: Fix smatch static checker warning Rahul Tanwar
@ 2022-10-25 11:03 ` Rahul Tanwar
  2022-10-27  1:05   ` Stephen Boyd
  0 siblings, 1 reply; 3+ messages in thread
From: Rahul Tanwar @ 2022-10-25 11:03 UTC (permalink / raw)
  To: sboyd, dan.carpenter, linux-clk, yzhu
  Cc: linux-kernel, linux-lgm-soc, Rahul Tanwar

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>
---
 drivers/clk/x86/clk-lgm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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);
 	}
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/1] clk: mxl: Fix smatch static checker warning
  2022-10-25 11:03 ` [PATCH 1/1] " Rahul Tanwar
@ 2022-10-27  1:05   ` Stephen Boyd
  0 siblings, 0 replies; 3+ messages in thread
From: Stephen Boyd @ 2022-10-27  1:05 UTC (permalink / raw)
  To: Rahul Tanwar, dan.carpenter, linux-clk, yzhu
  Cc: linux-kernel, linux-lgm-soc, Rahul Tanwar

Quoting Rahul Tanwar (2022-10-25 04:03:57)
> 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>
> ---

Applied to clk-next

BTW, please don't send a cover letter for single patches.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-10-27  1:05 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-10-25 11:03 [PATCH 0/1] clk: mxl: Fix smatch static checker warning Rahul Tanwar
2022-10-25 11:03 ` [PATCH 1/1] " Rahul Tanwar
2022-10-27  1:05   ` Stephen Boyd

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox