Commit b8c8c495 authored by Corentin Labbe's avatar Corentin Labbe Committed by Mauro Carvalho Chehab

media: staging: media: zoran: fix kzalloc style

Prefer kzalloc(sizeof(*prt)...) over kzalloc(sizeof(struct.../
Signed-off-by: default avatarCorentin Labbe <clabbe@baylibre.com>
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
parent 87c5d693
...@@ -361,7 +361,7 @@ static int zr36016_setup(struct videocodec *codec) ...@@ -361,7 +361,7 @@ static int zr36016_setup(struct videocodec *codec)
return -ENOSPC; return -ENOSPC;
} }
//mem structure init //mem structure init
ptr = kzalloc(sizeof(struct zr36016), GFP_KERNEL); ptr = kzalloc(sizeof(*ptr), GFP_KERNEL);
codec->data = ptr; codec->data = ptr;
if (!ptr) if (!ptr)
return -ENOMEM; return -ENOMEM;
......
...@@ -754,7 +754,7 @@ static int zr36050_setup(struct videocodec *codec) ...@@ -754,7 +754,7 @@ static int zr36050_setup(struct videocodec *codec)
return -ENOSPC; return -ENOSPC;
} }
//mem structure init //mem structure init
ptr = kzalloc(sizeof(struct zr36050), GFP_KERNEL); ptr = kzalloc(sizeof(*ptr), GFP_KERNEL);
codec->data = ptr; codec->data = ptr;
if (!ptr) if (!ptr)
return -ENOMEM; return -ENOMEM;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment