media: staging: media: zoran: fix kzalloc style
authorCorentin Labbe <clabbe@baylibre.com>
Tue, 18 May 2021 12:41:12 +0000 (14:41 +0200)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Wed, 2 Jun 2021 12:03:41 +0000 (14:03 +0200)
Prefer kzalloc(sizeof(*prt)...) over kzalloc(sizeof(struct.../

Signed-off-by: Corentin Labbe <clabbe@baylibre.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/staging/media/zoran/zr36016.c
drivers/staging/media/zoran/zr36050.c

index 82702a1..9b350a8 100644 (file)
@@ -361,7 +361,7 @@ static int zr36016_setup(struct videocodec *codec)
                return -ENOSPC;
        }
        //mem structure init
-       ptr = kzalloc(sizeof(struct zr36016), GFP_KERNEL);
+       ptr = kzalloc(sizeof(*ptr), GFP_KERNEL);
        codec->data = ptr;
        if (!ptr)
                return -ENOMEM;
index a788628..8bb101f 100644 (file)
@@ -754,7 +754,7 @@ static int zr36050_setup(struct videocodec *codec)
                return -ENOSPC;
        }
        //mem structure init
-       ptr = kzalloc(sizeof(struct zr36050), GFP_KERNEL);
+       ptr = kzalloc(sizeof(*ptr), GFP_KERNEL);
        codec->data = ptr;
        if (!ptr)
                return -ENOMEM;