[media] staging: media: go7007: memory clear fix memory clearing for v4l2_subdev...
authorVolokh Konstantin <volokh84@gmail.com>
Wed, 16 Jan 2013 12:00:48 +0000 (09:00 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Wed, 6 Feb 2013 10:58:38 +0000 (08:58 -0200)
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>
drivers/staging/media/go7007/go7007-driver.c
drivers/staging/media/go7007/go7007-v4l2.c

index c9dfc75..00014e7 100644 (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;
index 0d3713d..9489975 100644 (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;