[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>
This commit is contained in:
Volokh Konstantin 2013-01-16 09:00:48 -03:00 committed by Mauro Carvalho Chehab
parent f85ed0ceeb
commit 61a2353c70
2 changed files with 2 additions and 2 deletions

View File

@ -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;

View File

@ -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;