From: Yang Yingliang <yangyingliang@huawei.com>
To: <linux-kernel@vger.kernel.org>, <linux-arm-msm@vger.kernel.org>,
<linux-media@vger.kernel.org>
Cc: <mchehab@kernel.org>, <hverkuil-cisco@xs4all.nl>,
<robert.foss@linaro.org>, <bryan.odonoghue@linaro.org>,
<vladimir.zapolskiy@linaro.org>
Subject: Re: [PATCH] media: camss: csid: fix wrong size passed to devm_kmalloc_array()
Date: Tue, 10 May 2022 09:19:23 +0800 [thread overview]
Message-ID: <ae190d9c-160d-7d3d-6a57-a50655b36a73@huawei.com> (raw)
In-Reply-To: <20220509140439.1361352-1-yangyingliang@huawei.com>
I made a mistake, this patch was sent twice, please ignore this patch.
Thanks,
Yang
On 2022/5/9 22:04, Yang Yingliang wrote:
> 'supplies' is a pointer, the real size of struct regulator_bulk_data
> should be pass to devm_kmalloc_array().
>
> Fixes: 0d8140179715 ("media: camss: Add regulator_bulk support")
> Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
> ---
> drivers/media/platform/qcom/camss/camss-csid.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/media/platform/qcom/camss/camss-csid.c b/drivers/media/platform/qcom/camss/camss-csid.c
> index f993f349b66b..80628801cf09 100644
> --- a/drivers/media/platform/qcom/camss/camss-csid.c
> +++ b/drivers/media/platform/qcom/camss/camss-csid.c
> @@ -666,7 +666,7 @@ int msm_csid_subdev_init(struct camss *camss, struct csid_device *csid,
> if (csid->num_supplies) {
> csid->supplies = devm_kmalloc_array(camss->dev,
> csid->num_supplies,
> - sizeof(csid->supplies),
> + sizeof(*csid->supplies),
> GFP_KERNEL);
> if (!csid->supplies)
> return -ENOMEM;
next prev parent reply other threads:[~2022-05-10 1:19 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-09 14:04 [PATCH] media: camss: csid: fix wrong size passed to devm_kmalloc_array() Yang Yingliang
2022-05-10 1:19 ` Yang Yingliang [this message]
2022-05-16 14:43 ` Robert Foss
2022-05-09 14:04 Yang Yingliang
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=ae190d9c-160d-7d3d-6a57-a50655b36a73@huawei.com \
--to=yangyingliang@huawei.com \
--cc=bryan.odonoghue@linaro.org \
--cc=hverkuil-cisco@xs4all.nl \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=robert.foss@linaro.org \
--cc=vladimir.zapolskiy@linaro.org \
/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;
as well as URLs for NNTP newsgroup(s).