From: Markus Elfring Date: Wed, 12 Oct 2016 08:44:05 +0000 (-0300) Subject: [media] DaVinci-VPFE-Capture: Improve another size determination in vpfe_open() X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=1d3811d35c0fc8d8c6cb3d8e666261ca84687b03;p=linux-beck.git [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 Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/platform/davinci/vpfe_capture.c b/drivers/media/platform/davinci/vpfe_capture.c index cee14aa95061..ab073f273b95 100644 --- a/drivers/media/platform/davinci/vpfe_capture.c +++ b/drivers/media/platform/davinci/vpfe_capture.c @@ -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;