Skip to content

Commit

Permalink
[media] staging: media: go7007: memory clear fix memory clearing for …
Browse files Browse the repository at this point in the history
…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>
  • Loading branch information
Volokh Konstantin authored and Mauro Carvalho Chehab committed Feb 6, 2013
1 parent f85ed0c commit 61a2353
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion drivers/staging/media/go7007/go7007-driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion drivers/staging/media/go7007/go7007-v4l2.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 61a2353

Please sign in to comment.