[MTD] replace kmalloc+memset with kzalloc
Signed-off-by: Yan Burman <yan_952@hotmail.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Esse commit está contido em:
@@ -78,12 +78,10 @@ static int __devinit omapflash_probe(struct platform_device *pdev)
|
||||
struct resource *res = pdev->resource;
|
||||
unsigned long size = res->end - res->start + 1;
|
||||
|
||||
info = kmalloc(sizeof(struct omapflash_info), GFP_KERNEL);
|
||||
info = kzalloc(sizeof(struct omapflash_info), GFP_KERNEL);
|
||||
if (!info)
|
||||
return -ENOMEM;
|
||||
|
||||
memset(info, 0, sizeof(struct omapflash_info));
|
||||
|
||||
if (!request_mem_region(res->start, size, "flash")) {
|
||||
err = -EBUSY;
|
||||
goto out_free_info;
|
||||
|
Referência em uma nova issue
Block a user