From: davidcomponentone@gmail.com
To: agross@kernel.org
Cc: davidcomponentone@gmail.com, bjorn.andersson@linaro.org,
kishon@ti.com, vkoul@kernel.org, linux-arm-msm@vger.kernel.org,
linux-phy@lists.infradead.org, linux-kernel@vger.kernel.org,
Zeal Robot <zealci@zte.com.cn>,
Yang Guang <yang.guang5@zte.com.cn>
Subject: [PATCH] pyh: qcom: fix the application of sizeof to pointer
Date: Wed, 8 Dec 2021 09:03:21 +0800 [thread overview]
Message-ID: <c74d05d5197fa4fba96c4bd1cd597cd644c694b6.1638924754.git.davidcomponentone@gmail.com> (raw)
From: David Yang <davidcomponentone@gmail.com>
The coccinelle check report:
./drivers/phy/qualcomm/phy-qcom-edp.c:574:31-37:
ERROR: application of sizeof to pointer
Using the real size to fix it.
Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Yang Guang <yang.guang5@zte.com.cn>
Signed-off-by: David Yang <davidcomponentone@gmail.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.30.2
--
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy
next reply other threads:[~2021-12-08 1:03 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-08 1:03 davidcomponentone [this message]
2021-12-08 5:16 ` [PATCH] pyh: qcom: fix the application of sizeof to pointer Bjorn Andersson
-- strict thread matches above, loose matches on Subject: below --
2021-12-10 6:21 davidcomponentone
2021-12-14 9:26 ` Vinod Koul
2021-12-14 10:17 ` David Yang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=c74d05d5197fa4fba96c4bd1cd597cd644c694b6.1638924754.git.davidcomponentone@gmail.com \
--to=davidcomponentone@gmail.com \
--cc=agross@kernel.org \
--cc=bjorn.andersson@linaro.org \
--cc=kishon@ti.com \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-phy@lists.infradead.org \
--cc=vkoul@kernel.org \
--cc=yang.guang5@zte.com.cn \
--cc=zealci@zte.com.cn \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox