From: Rahul Tanwar <rtanwar@maxlinear.com>
To: <sboyd@kernel.org>, <dan.carpenter@oracle.com>,
<linux-clk@vger.kernel.org>, <yzhu@maxlinear.com>
Cc: <linux-kernel@vger.kernel.org>, <linux-lgm-soc@maxlinear.com>,
"Rahul Tanwar" <rtanwar@maxlinear.com>
Subject: [PATCH 1/1] clk: mxl: Fix smatch static checker warning
Date: Tue, 25 Oct 2022 19:03:57 +0800 [thread overview]
Message-ID: <49e339d4739e4ae4c92b00c1b2918af0755d4122.1666695221.git.rtanwar@maxlinear.com> (raw)
In-Reply-To: <cover.1666695221.git.rtanwar@maxlinear.com>
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
next prev parent reply other threads:[~2022-10-25 11:04 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-25 11:03 [PATCH 0/1] " Rahul Tanwar
2022-10-25 11:03 ` Rahul Tanwar [this message]
2022-10-27 1:05 ` [PATCH 1/1] " Stephen Boyd
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=49e339d4739e4ae4c92b00c1b2918af0755d4122.1666695221.git.rtanwar@maxlinear.com \
--to=rtanwar@maxlinear.com \
--cc=dan.carpenter@oracle.com \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-lgm-soc@maxlinear.com \
--cc=sboyd@kernel.org \
--cc=yzhu@maxlinear.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®