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 82702a13b05fdcbf8fe4de9c4e80ddca14e149fe..9b350a885879f3344326efc49719ac7b665916ee 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 a78862852a477952583f145dccc063076a0b0609..8bb101fa18bc45137a1aa3fb446c9d4765f49f12 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;