From: Volokh Konstantin Date: Wed, 16 Jan 2013 12:00:48 +0000 (-0300) Subject: [media] staging: media: go7007: memory clear fix memory clearing for v4l2_subdev... X-Git-Url: http://drtracing.org/?a=commitdiff_plain;h=61a2353c70d1f33c52768fb7d3fd7ee173928086;p=deliverable%2Flinux.git [media] staging: media: go7007: memory clear fix memory clearing for v4l2_subdev allocation Signed-off-by: Volokh Konstantin Acked-by: Dan Carpenter Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/staging/media/go7007/go7007-driver.c b/drivers/staging/media/go7007/go7007-driver.c index c9dfc75d1d2c..00014e754c75 100644 --- a/drivers/staging/media/go7007/go7007-driver.c +++ b/drivers/staging/media/go7007/go7007-driver.c @@ -572,7 +572,7 @@ struct go7007 *go7007_alloc(struct go7007_board_info *board, struct device *dev) struct go7007 *go; int i; - go = kmalloc(sizeof(struct go7007), GFP_KERNEL); + go = kzalloc(sizeof(struct go7007), GFP_KERNEL); if (go == NULL) return NULL; go->dev = dev; diff --git a/drivers/staging/media/go7007/go7007-v4l2.c b/drivers/staging/media/go7007/go7007-v4l2.c index 0d3713dceba5..94899759229f 100644 --- a/drivers/staging/media/go7007/go7007-v4l2.c +++ b/drivers/staging/media/go7007/go7007-v4l2.c @@ -98,7 +98,7 @@ static int go7007_open(struct file *file) if (go->status != STATUS_ONLINE) return -EBUSY; - gofh = kmalloc(sizeof(struct go7007_file), GFP_KERNEL); + gofh = kzalloc(sizeof(struct go7007_file), GFP_KERNEL); if (gofh == NULL) return -ENOMEM; ++go->ref_count;