mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-03 12:24:37 -04:00
[media] DaVinci-VPFE-Capture: Improve another size determination in vpfe_open()
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. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
This commit is contained in:
committed by
Mauro Carvalho Chehab
parent
efb74461f5
commit
1d3811d35c
@@ -511,7 +511,7 @@ static int vpfe_open(struct file *file)
|
||||
}
|
||||
|
||||
/* Allocate memory for the file handle object */
|
||||
fh = kmalloc(sizeof(struct vpfe_fh), GFP_KERNEL);
|
||||
fh = kmalloc(sizeof(*fh), GFP_KERNEL);
|
||||
if (!fh)
|
||||
return -ENOMEM;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user