Skip to content

Commit

Permalink
[media] mem2mem_testdev: Add missing braces around sizeof
Browse files Browse the repository at this point in the history
Fixes the following checkpatch warnings:
WARNING: sizeof *ctx should be sizeof(*ctx)
WARNING: sizeof *dev should be sizeof(*dev)

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
  • Loading branch information
Sachin Kamat authored and Mauro Carvalho Chehab committed Oct 6, 2012
1 parent b7e13ef commit 56ed221
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/media/platform/mem2mem_testdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -894,7 +894,7 @@ static int m2mtest_open(struct file *file)

if (mutex_lock_interruptible(&dev->dev_mutex))
return -ERESTARTSYS;
ctx = kzalloc(sizeof *ctx, GFP_KERNEL);
ctx = kzalloc(sizeof(*ctx), GFP_KERNEL);
if (!ctx) {
rc = -ENOMEM;
goto open_unlock;
Expand Down Expand Up @@ -1020,7 +1020,7 @@ static int m2mtest_probe(struct platform_device *pdev)
struct video_device *vfd;
int ret;

dev = kzalloc(sizeof *dev, GFP_KERNEL);
dev = kzalloc(sizeof(*dev), GFP_KERNEL);
if (!dev)
return -ENOMEM;

Expand Down

0 comments on commit 56ed221

Please sign in to comment.