[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
@@ -273,14 +273,12 @@ sa1100_setup_mtd(struct platform_device *pdev, struct flash_platform_data *plat)
|
||||
/*
|
||||
* Allocate the map_info structs in one go.
|
||||
*/
|
||||
info = kmalloc(size, GFP_KERNEL);
|
||||
info = kzalloc(size, GFP_KERNEL);
|
||||
if (!info) {
|
||||
ret = -ENOMEM;
|
||||
goto out;
|
||||
}
|
||||
|
||||
memset(info, 0, size);
|
||||
|
||||
if (plat->init) {
|
||||
ret = plat->init();
|
||||
if (ret)
|
||||
|
Reference in New Issue
Block a user