[PATCH linux-next] clk/keystone: fix application of sizeof to pointer
From: jing yangyang <hidden>
Date: 2021-08-20 02:21:22
sizeof when applied to a pointer typed expression gives the size of the pointer. ./drivers/clk/keystone/sci-clk.c:398:8-14: ERROR application of sizeof to pointer This issue was detected with the help of Coccinelle. Reported-by: Zeal Robot <redacted> Signed-off-by: jing yangyang <redacted> --- 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 7e1b136..010a61a 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);
--
1.8.3.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel