All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] phy: qcom: fix bug: application of sizeof to pointer
@ 2021-12-07 13:16 ` Guo Zhengkui
  0 siblings, 0 replies; 14+ messages in thread
From: Guo Zhengkui @ 2021-12-07 13:16 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Kishon Vijay Abraham I, Vinod Koul,
	open list:ARM/QUALCOMM SUPPORT, open list:GENERIC PHY FRAMEWORK,
	open list
  Cc: kernel, Guo Zhengkui

Fix following coccicheck error:
./drivers/phy/qualcomm/phy-qcom-edp.c:574:31-37:
ERROR: application of sizeof to pointer.

Use sizeof(*data) instead.

Signed-off-by: Guo Zhengkui <guozhengkui@vivo.com>
---
 drivers/phy/qualcomm/phy-qcom-edp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/phy/qualcomm/phy-qcom-edp.c b/drivers/phy/qualcomm/phy-qcom-edp.c
index 17d5653b661d..5fe4eab9cac1 100644
--- a/drivers/phy/qualcomm/phy-qcom-edp.c
+++ b/drivers/phy/qualcomm/phy-qcom-edp.c
@@ -571,7 +571,7 @@ static int qcom_edp_clks_register(struct qcom_edp *edp, struct device_node *np)
 	struct clk_init_data init = { };
 	int ret;
 
-	data = devm_kzalloc(edp->dev, sizeof(data), GFP_KERNEL);
+	data = devm_kzalloc(edp->dev, sizeof(*data), GFP_KERNEL);
 	if (!data)
 		return -ENOMEM;
 
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2021-12-09 11:55 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-07 13:16 [PATCH] phy: qcom: fix bug: application of sizeof to pointer Guo Zhengkui
2021-12-07 13:16 ` Guo Zhengkui
2021-12-07 15:13 ` Bjorn Andersson
2021-12-07 15:13   ` Bjorn Andersson
     [not found] ` <AO6AKgBME5Y4PNQLIg0Wlap9.9.1638889943341.Hmail.guozhengkui@vivo.com.@PFlhOTZLT3luc080NzhjVnhAcmlwcGVyPg==>
2021-12-08  6:56   ` Guo Zhengkui
2021-12-08  6:56     ` Guo Zhengkui
2021-12-08 16:29     ` Bjorn Andersson
2021-12-08 16:29       ` Bjorn Andersson
2021-12-09  3:21 ` [PATCH] phy: qcom: use struct_size instead of sizeof Guo Zhengkui
2021-12-09  3:21   ` Guo Zhengkui
2021-12-09  4:50   ` Bjorn Andersson
2021-12-09  4:50     ` Bjorn Andersson
2021-12-09 11:55   ` Vinod Koul
2021-12-09 11:55     ` Vinod Koul

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.