LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: "F.A.Sulaiman" <asha.16@itfac.mrt.ac.lk>
To: mturquette@baylibre.com, sboyd@kernel.org
Cc: "F.A.Sulaiman" <asha.16@itfac.mrt.ac.lk>,
linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] clk: fix passing zero to warning in clk_hw_create_clk()
Date: Fri, 27 Aug 2021 17:11:15 +0530 [thread overview]
Message-ID: <20210827114115.15255-1-asha.16@itfac.mrt.ac.lk> (raw)
Smatch has reported passing to zero warning in ERR_CAST.
"drivers/clk/clk.c:3673 clk_hw_create_clk() warn: passing zero to 'ERR_CAST'"
This patch resolves it by using IS_ERR instead of IS_ERR_OR_NULL.
Signed-off-by: F.A. SULAIMAN <asha.16@itfac.mrt.ac.lk>
---
drivers/clk/clk.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c
index 65508eb89ec9..cf47526789af 100644
--- a/drivers/clk/clk.c
+++ b/drivers/clk/clk.c
@@ -3669,7 +3669,7 @@ struct clk *clk_hw_create_clk(struct device *dev, struct clk_hw *hw,
struct clk_core *core;
/* This is to allow this function to be chained to others */
- if (IS_ERR_OR_NULL(hw))
+ if (IS_ERR(hw))
return ERR_CAST(hw);
core = hw->core;
--
2.17.1
reply other threads:[~2021-08-27 11:41 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20210827114115.15255-1-asha.16@itfac.mrt.ac.lk \
--to=asha.16@itfac.mrt.ac.lk \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mturquette@baylibre.com \
--cc=sboyd@kernel.org \
--subject='Re: [PATCH] clk: fix passing zero to warning in clk_hw_create_clk()' \
/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
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).