aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVolokh Konstantin <volokh84@gmail.com>2013-01-16 07:00:48 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2013-02-06 05:58:38 -0500
commit61a2353c70d1f33c52768fb7d3fd7ee173928086 (patch)
tree9de17dc0cd20ab075a0768f0f024086cab57a576
parentf85ed0ceeba78b6b15a857ce48888fdb52de28d0 (diff)
[media] staging: media: go7007: memory clear fix memory clearing for v4l2_subdev allocation
Signed-off-by: Volokh Konstantin <volokh84@gmail.com> Acked-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r--drivers/staging/media/go7007/go7007-driver.c2
-rw-r--r--drivers/staging/media/go7007/go7007-v4l2.c2
2 files changed, 2 insertions, 2 deletions
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)
572 struct go7007 *go; 572 struct go7007 *go;
573 int i; 573 int i;
574 574
575 go = kmalloc(sizeof(struct go7007), GFP_KERNEL); 575 go = kzalloc(sizeof(struct go7007), GFP_KERNEL);
576 if (go == NULL) 576 if (go == NULL)
577 return NULL; 577 return NULL;
578 go->dev = dev; 578 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)
98 98
99 if (go->status != STATUS_ONLINE) 99 if (go->status != STATUS_ONLINE)
100 return -EBUSY; 100 return -EBUSY;
101 gofh = kmalloc(sizeof(struct go7007_file), GFP_KERNEL); 101 gofh = kzalloc(sizeof(struct go7007_file), GFP_KERNEL);
102 if (gofh == NULL) 102 if (gofh == NULL)
103 return -ENOMEM; 103 return -ENOMEM;
104 ++go->ref_count; 104 ++go->ref_count;