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:   Tue, 12 Oct 2021 10:19:31 +0800
From:   davidcomponentone@...il.com
To:     nm@...com
Cc:     kristo@...nel.org, ssantosh@...nel.org, mturquette@...libre.com,
        sboyd@...nel.org, linux-arm-kernel@...ts.infradead.org,
        linux-kernel@...r.kernel.org, linux-clk@...r.kernel.org,
        David Yang <davidcomponentone@...il.com>,
        Zeal Robot <zealci@....com.cn>
Subject: [PATCH sci-clk] Fix application of sizeof to pointer

From: David Yang <davidcomponentone@...il.com>

The coccinelle check report:
"./drivers/clk/keystone/sci-clk.c:398:8-14:
ERROR: application of sizeof to pointer"
Using the "sizeof(*clk)" to fix it.

Reported-by: Zeal Robot <zealci@....com.cn>
Signed-off-by: David Yang <davidcomponentone@...il.com>
---
 drivers/clk/keystone/sci-clk.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/clk/keystone/sci-clk.c b/drivers/clk/keystone/sci-clk.c
index 7e1b136e71ae..010a61a2549c 100644
--- a/drivers/clk/keystone/sci-clk.c
+++ b/drivers/clk/keystone/sci-clk.c
@@ -395,7 +395,7 @@ static struct clk_hw *sci_clk_get(struct of_phandle_args *clkspec, void *data)
 	key.clk_id = clkspec->args[1];
 
 	clk = bsearch(&key, provider->clocks, provider->num_clocks,
-		      sizeof(clk), _cmp_sci_clk);
+		      sizeof(*clk), _cmp_sci_clk);
 
 	if (!clk)
 		return ERR_PTR(-ENODEV);
-- 
2.30.2

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ