diff options
author | Yang Yingliang <yangyingliang@huawei.com> | 2022-05-09 17:04:59 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-08-17 16:14:31 +0300 |
commit | 19923b72e0c4c121d1f7fae4310a3fafbda858da (patch) | |
tree | 978c35d8fc31c4cd07ea649dbc469c7112ce205e /drivers/media | |
parent | b3db99b49097d97949b0de071d47ccb27de23244 (diff) | |
download | linux-19923b72e0c4c121d1f7fae4310a3fafbda858da.tar.xz |
media: camss: csid: fix wrong size passed to devm_kmalloc_array()
[ Upstream commit 4c25384d136642d72098e36201ca988533e73065 ]
'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>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/platform/qcom/camss/camss-csid.c | 2 |
1 files changed, 1 insertions, 1 deletions
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; |