[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 c9dfc75d1d2c3368193893f6928c5ea3097ad7d3..00014e754c75395a2ef5e53d862097218d6998d1 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 0d3713dceba5a165f69641314c877d7d3a9b86a8..94899759229f33f0130b3e7bc9eee675f7cf8f18 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;