lkml.org 
[lkml]   [2021]   [Dec]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] phy: qcom: fix bug: application of sizeof to pointer
Date
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
\
 
 \ /
  Last update: 2021-12-07 14:17    [W:1.500 / U:0.788 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site