diff options
author | Markus Elfring <elfring@users.sourceforge.net> | 2016-10-12 10:44:05 +0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2016-11-16 15:44:17 +0100 |
commit | 1d3811d35c0fc8d8c6cb3d8e666261ca84687b03 (patch) | |
tree | 676e3ed44ab2b82403fcd46f4098d451e4b86a8c | |
parent | [media] DaVinci-VPFE-Capture: Delete an unnecessary variable initialisation i... (diff) | |
download | linux-1d3811d35c0fc8d8c6cb3d8e666261ca84687b03.tar.xz linux-1d3811d35c0fc8d8c6cb3d8e666261ca84687b03.zip |
[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>
-rw-r--r-- | drivers/media/platform/davinci/vpfe_capture.c | 2 |
1 files changed, 1 insertions, 1 deletions
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; |