Commit a9f69bd5 authored by Shobhit Kukreti's avatar Shobhit Kukreti Committed by Greg Kroah-Hartman

staging: erofs: Replace kzalloc(struct ..) with kzalloc(*ptr)

Resolve checkpatch warning:
Prefer kzalloc(sizeof(*ptr)...) over kzalloc(sizeof(struct ..)
Signed-off-by: default avatarShobhit Kukreti <shobhitkukreti@gmail.com>
Reviewed-by: default avatarChao Yu <yuchao0@huawei.com>
Reviewed-by: default avatarGao Xiang <gaoxiang25@huawei.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent de3728dc
...@@ -383,7 +383,7 @@ static int erofs_read_super(struct super_block *sb, ...@@ -383,7 +383,7 @@ static int erofs_read_super(struct super_block *sb,
goto err; goto err;
} }
sbi = kzalloc(sizeof(struct erofs_sb_info), GFP_KERNEL); sbi = kzalloc(sizeof(*sbi), GFP_KERNEL);
if (unlikely(!sbi)) { if (unlikely(!sbi)) {
err = -ENOMEM; err = -ENOMEM;
goto err; goto err;
......
...@@ -1263,8 +1263,7 @@ jobqueue_init(struct super_block *sb, ...@@ -1263,8 +1263,7 @@ jobqueue_init(struct super_block *sb,
goto out; goto out;
} }
iosb = kvzalloc(sizeof(struct z_erofs_vle_unzip_io_sb), iosb = kvzalloc(sizeof(*iosb), GFP_KERNEL | __GFP_NOFAIL);
GFP_KERNEL | __GFP_NOFAIL);
DBG_BUGON(!iosb); DBG_BUGON(!iosb);
/* initialize fields in the allocated descriptor */ /* initialize fields in the allocated descriptor */
......
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