[PATCH 4/5] nand omap: use xzalloc instead of calloc
Sascha Hauer
s.hauer at pengutronix.de
Mon Apr 11 10:10:35 EDT 2011
Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
---
drivers/mtd/nand/nand_omap_gpmc.c | 6 +-----
1 files changed, 1 insertions(+), 5 deletions(-)
diff --git a/drivers/mtd/nand/nand_omap_gpmc.c b/drivers/mtd/nand/nand_omap_gpmc.c
index 7874810..d61f7d9 100644
--- a/drivers/mtd/nand/nand_omap_gpmc.c
+++ b/drivers/mtd/nand/nand_omap_gpmc.c
@@ -675,11 +675,7 @@ static int gpmc_nand_probe(struct device_d *pdev)
return -ENODEV;
}
- oinfo = calloc(1, sizeof(struct gpmc_nand_info));
- if (!oinfo) {
- dev_dbg(pdev, "oinfo alloc failed!\n");
- return -ENOMEM;
- }
+ oinfo = xzalloc(sizeof(*oinfo));
/* fill up my data structures */
oinfo->pdev = pdev;
--
1.7.2.3
More information about the barebox
mailing list