diff options
author | Joe Perches <joe@perches.com> | 2010-11-05 04:07:40 +0100 |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2010-12-03 17:27:29 +0100 |
commit | 309b5e4e4154721f8079bc250d2233fd4b3aa039 (patch) | |
tree | b004e9ff14c82a247e34e6050d1477ac750f7c54 /drivers/mtd/nand | |
parent | mtd: OneNAND: Fix page offset handling at 2KiB pagesize (diff) | |
download | linux-309b5e4e4154721f8079bc250d2233fd4b3aa039.tar.xz linux-309b5e4e4154721f8079bc250d2233fd4b3aa039.zip |
mtd: use vzalloc
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'drivers/mtd/nand')
-rw-r--r-- | drivers/mtd/nand/nandsim.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/mtd/nand/nandsim.c b/drivers/mtd/nand/nandsim.c index c45e06fba154..a5aa99f014ba 100644 --- a/drivers/mtd/nand/nandsim.c +++ b/drivers/mtd/nand/nandsim.c @@ -470,7 +470,7 @@ static int alloc_device(struct nandsim *ns) err = -EINVAL; goto err_close; } - ns->pages_written = vmalloc(ns->geom.pgnum); + ns->pages_written = vzalloc(ns->geom.pgnum); if (!ns->pages_written) { NS_ERR("alloc_device: unable to allocate pages written array\n"); err = -ENOMEM; @@ -483,7 +483,6 @@ static int alloc_device(struct nandsim *ns) goto err_free; } ns->cfile = cfile; - memset(ns->pages_written, 0, ns->geom.pgnum); return 0; } |