mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 23:32:14 +00:00
[PATCH] sysfs: kzalloc conversion
this converts fs/sysfs to kzalloc() usage. compile tested with make allyesconfig Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
parent
03e88ae1b1
commit
58d49283b8
2 changed files with 2 additions and 4 deletions
|
@ -54,11 +54,10 @@ int sysfs_setattr(struct dentry * dentry, struct iattr * iattr)
|
|||
|
||||
if (!sd_iattr) {
|
||||
/* setting attributes for the first time, allocate now */
|
||||
sd_iattr = kmalloc(sizeof(struct iattr), GFP_KERNEL);
|
||||
sd_iattr = kzalloc(sizeof(struct iattr), GFP_KERNEL);
|
||||
if (!sd_iattr)
|
||||
return -ENOMEM;
|
||||
/* assign default attributes */
|
||||
memset(sd_iattr, 0, sizeof(struct iattr));
|
||||
sd_iattr->ia_mode = sd->s_mode;
|
||||
sd_iattr->ia_uid = 0;
|
||||
sd_iattr->ia_gid = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue