summaryrefslogtreecommitdiff
path: root/drivers/media/platform
diff options
context:
space:
mode:
authorMarkus Elfring <elfring@users.sourceforge.net>2017-08-28 05:55:16 -0400
committerMauro Carvalho Chehab <mchehab@s-opensource.com>2017-09-23 08:20:57 -0400
commit2d3da59ff163b2aa805de0fc65ba933a735b00cd (patch)
tree4c370d1bf357c25d8941627ed8968ab295f1f8ee /drivers/media/platform
parentd303b7c5b2660d93ba0dd2bf99b7dfa7bb93de73 (diff)
media: drivers: improve a size determination
Replace the specification of a data structure by a pointer dereference as the parameter for the operator "sizeof" to make the corresponding size determination a bit safer according to the Linux coding style convention. This issue was detected by using the Coccinelle software. [mchehab@s-opensoure.com: merge similar patches into one] Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Signed-off-by: Hans Verkuil <hansverk@cisco.com>
Diffstat (limited to 'drivers/media/platform')
-rw-r--r--drivers/media/platform/atmel/atmel-isc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/platform/atmel/atmel-isc.c b/drivers/media/platform/atmel/atmel-isc.c
index db410c558a74..755d2d4dd142 100644
--- a/drivers/media/platform/atmel/atmel-isc.c
+++ b/drivers/media/platform/atmel/atmel-isc.c
@@ -1505,7 +1505,7 @@ static int isc_formats_init(struct isc_device *isc)
isc->num_user_formats = num_fmts;
isc->user_formats = devm_kcalloc(isc->dev,
- num_fmts, sizeof(struct isc_format *),
+ num_fmts, sizeof(*isc->user_formats),
GFP_KERNEL);
if (!isc->user_formats)
return -ENOMEM;