You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
[MTD] replace kmalloc+memset with kzalloc
Signed-off-by: Yan Burman <yan_952@hotmail.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
This commit is contained in:
committed by
David Woodhouse
parent
998a43e72d
commit
95b93a0cd4
@@ -431,7 +431,7 @@ static int mtd_ioctl(struct inode *inode, struct file *file,
|
||||
if(!(file->f_mode & 2))
|
||||
return -EPERM;
|
||||
|
||||
erase=kmalloc(sizeof(struct erase_info),GFP_KERNEL);
|
||||
erase=kzalloc(sizeof(struct erase_info),GFP_KERNEL);
|
||||
if (!erase)
|
||||
ret = -ENOMEM;
|
||||
else {
|
||||
@@ -440,7 +440,6 @@ static int mtd_ioctl(struct inode *inode, struct file *file,
|
||||
|
||||
init_waitqueue_head(&waitq);
|
||||
|
||||
memset (erase,0,sizeof(struct erase_info));
|
||||
if (copy_from_user(&erase->addr, argp,
|
||||
sizeof(struct erase_info_user))) {
|
||||
kfree(erase);
|
||||
|
||||
Reference in New Issue
Block a user