lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:   Fri, 27 Aug 2021 17:11:15 +0530
From:   "F.A.Sulaiman" <asha.16@...ac.mrt.ac.lk>
To:     mturquette@...libre.com, sboyd@...nel.org
Cc:     "F.A.Sulaiman" <asha.16@...ac.mrt.ac.lk>,
        linux-clk@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH] clk: fix passing zero to warning in clk_hw_create_clk()

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@...ac.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ