[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210518124113.1823055-4-clabbe@baylibre.com>
Date: Tue, 18 May 2021 12:41:12 +0000
From: Corentin Labbe <clabbe@...libre.com>
To: gregkh@...uxfoundation.org, mchehab@...nel.org
Cc: linux-kernel@...r.kernel.org, linux-media@...r.kernel.org,
linux-staging@...ts.linux.dev, mjpeg-users@...ts.sourceforge.net,
Corentin Labbe <clabbe@...libre.com>
Subject: [PATCH 4/5] staging: media: zoran: fix kzalloc style
Prefer kzalloc(sizeof(*prt)...) over kzalloc(sizeof(struct.../
Signed-off-by: Corentin Labbe <clabbe@...libre.com>
---
drivers/staging/media/zoran/zr36016.c | 2 +-
drivers/staging/media/zoran/zr36050.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/media/zoran/zr36016.c b/drivers/staging/media/zoran/zr36016.c
index 82702a13b05f..9b350a885879 100644
--- a/drivers/staging/media/zoran/zr36016.c
+++ b/drivers/staging/media/zoran/zr36016.c
@@ -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;
diff --git a/drivers/staging/media/zoran/zr36050.c b/drivers/staging/media/zoran/zr36050.c
index a78862852a47..8bb101fa18bc 100644
--- a/drivers/staging/media/zoran/zr36050.c
+++ b/drivers/staging/media/zoran/zr36050.c
@@ -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;
--
2.26.3
Powered by blists - more mailing lists