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>
This commit is contained in:

committed by
Mauro Carvalho Chehab

parent
d303b7c5b2
commit
2d3da59ff1
@@ -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;
|
||||
|
Reference in New Issue
Block a user