mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-10 07:00:48 +00:00
staging: erofs: Replace kzalloc(struct ..) with kzalloc(*ptr)
Resolve checkpatch warning: Prefer kzalloc(sizeof(*ptr)...) over kzalloc(sizeof(struct ..) Signed-off-by: Shobhit Kukreti <shobhitkukreti@gmail.com> Reviewed-by: Chao Yu <yuchao0@huawei.com> Reviewed-by: Gao Xiang <gaoxiang25@huawei.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
de3728dcd3
commit
a9f69bd555
@ -383,7 +383,7 @@ static int erofs_read_super(struct super_block *sb,
|
||||
goto err;
|
||||
}
|
||||
|
||||
sbi = kzalloc(sizeof(struct erofs_sb_info), GFP_KERNEL);
|
||||
sbi = kzalloc(sizeof(*sbi), GFP_KERNEL);
|
||||
if (unlikely(!sbi)) {
|
||||
err = -ENOMEM;
|
||||
goto err;
|
||||
|
@ -1263,8 +1263,7 @@ jobqueue_init(struct super_block *sb,
|
||||
goto out;
|
||||
}
|
||||
|
||||
iosb = kvzalloc(sizeof(struct z_erofs_vle_unzip_io_sb),
|
||||
GFP_KERNEL | __GFP_NOFAIL);
|
||||
iosb = kvzalloc(sizeof(*iosb), GFP_KERNEL | __GFP_NOFAIL);
|
||||
DBG_BUGON(!iosb);
|
||||
|
||||
/* initialize fields in the allocated descriptor */
|
||||
|
Loading…
x
Reference in New Issue
Block a user