[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
@@ -92,12 +92,11 @@ static int physmap_flash_probe(struct platform_device *dev)
|
||||
(unsigned long long)(dev->resource->end - dev->resource->start + 1),
|
||||
(unsigned long long)dev->resource->start);
|
||||
|
||||
info = kmalloc(sizeof(struct physmap_flash_info), GFP_KERNEL);
|
||||
info = kzalloc(sizeof(struct physmap_flash_info), GFP_KERNEL);
|
||||
if (info == NULL) {
|
||||
err = -ENOMEM;
|
||||
goto err_out;
|
||||
}
|
||||
memset(info, 0, sizeof(*info));
|
||||
|
||||
platform_set_drvdata(dev, info);
|
||||
|
||||
|
Reference in New Issue
Block a user