aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/platform/s5p-mfc/s5p_mfc.c
diff options
context:
space:
mode:
authorMarkus Elfring <elfring@users.sourceforge.net>2017-09-08 13:30:09 -0700
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2017-10-16 16:50:30 -0700
commitd7f15bde0f25ee8a5ea3aad96522ba851a47a0b0 (patch)
tree4b47486255d4b40cf9b458566c2b2a7b1ef4ffdc /drivers/media/platform/s5p-mfc/s5p_mfc.c
parentmedia: s5p-mfc: Delete an error message for a failed memory allocation (diff)
downloadlinux-dev-d7f15bde0f25ee8a5ea3aad96522ba851a47a0b0.tar.xz
linux-dev-d7f15bde0f25ee8a5ea3aad96522ba851a47a0b0.zip
media: s5p-mfc: Improve a size determination in s5p_mfc_alloc_memdev()
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. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media/platform/s5p-mfc/s5p_mfc.c')
-rw-r--r--drivers/media/platform/s5p-mfc/s5p_mfc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc.c b/drivers/media/platform/s5p-mfc/s5p_mfc.c
index 8af45d53846f..abfb70b07032 100644
--- a/drivers/media/platform/s5p-mfc/s5p_mfc.c
+++ b/drivers/media/platform/s5p-mfc/s5p_mfc.c
@@ -1083,7 +1083,7 @@ static struct device *s5p_mfc_alloc_memdev(struct device *dev,
struct device *child;
int ret;
- child = devm_kzalloc(dev, sizeof(struct device), GFP_KERNEL);
+ child = devm_kzalloc(dev, sizeof(*child), GFP_KERNEL);
if (!child)
return NULL;