summaryrefslogtreecommitdiff
path: root/drivers/media/platform/qcom/camss-8x16/camss-vfe.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/platform/qcom/camss-8x16/camss-vfe.c')
-rw-r--r--drivers/media/platform/qcom/camss-8x16/camss-vfe.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/media/platform/qcom/camss-8x16/camss-vfe.c b/drivers/media/platform/qcom/camss-8x16/camss-vfe.c
index 55232a912950..a6329a8a7c4a 100644
--- a/drivers/media/platform/qcom/camss-8x16/camss-vfe.c
+++ b/drivers/media/platform/qcom/camss-8x16/camss-vfe.c
@@ -2794,7 +2794,7 @@ int msm_vfe_subdev_init(struct vfe_device *vfe, const struct resources *res)
while (res->clock[vfe->nclocks])
vfe->nclocks++;
- vfe->clock = devm_kzalloc(dev, vfe->nclocks * sizeof(*vfe->clock),
+ vfe->clock = devm_kcalloc(dev, vfe->nclocks, sizeof(*vfe->clock),
GFP_KERNEL);
if (!vfe->clock)
return -ENOMEM;
@@ -2817,8 +2817,10 @@ int msm_vfe_subdev_init(struct vfe_device *vfe, const struct resources *res)
continue;
}
- clock->freq = devm_kzalloc(dev, clock->nfreqs *
- sizeof(*clock->freq), GFP_KERNEL);
+ clock->freq = devm_kcalloc(dev,
+ clock->nfreqs,
+ sizeof(*clock->freq),
+ GFP_KERNEL);
if (!clock->freq)
return -ENOMEM;