diff options
author | Burman Yan <yan_952@hotmail.com> | 2006-11-15 14:10:29 -0500 |
---|---|---|
committer | David Woodhouse <dwmw2@infradead.org> | 2006-11-28 18:47:21 -0500 |
commit | 95b93a0cd46682c6d9e8eea803fda510cb6b863a (patch) | |
tree | 7e430d3fc04ed20791187d144730dd3052292c67 /drivers/mtd/devices/phram.c | |
parent | 998a43e72d20afa7566dad66fd866fe939a89c09 (diff) |
[MTD] replace kmalloc+memset with kzalloc
Signed-off-by: Yan Burman <yan_952@hotmail.com>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Diffstat (limited to 'drivers/mtd/devices/phram.c')
-rw-r--r-- | drivers/mtd/devices/phram.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/mtd/devices/phram.c b/drivers/mtd/devices/phram.c index 6c7337f9ebbb..56cc1ca7ffd5 100644 --- a/drivers/mtd/devices/phram.c +++ b/drivers/mtd/devices/phram.c | |||
@@ -126,12 +126,10 @@ static int register_device(char *name, unsigned long start, unsigned long len) | |||
126 | struct phram_mtd_list *new; | 126 | struct phram_mtd_list *new; |
127 | int ret = -ENOMEM; | 127 | int ret = -ENOMEM; |
128 | 128 | ||
129 | new = kmalloc(sizeof(*new), GFP_KERNEL); | 129 | new = kzalloc(sizeof(*new), GFP_KERNEL); |
130 | if (!new) | 130 | if (!new) |
131 | goto out0; | 131 | goto out0; |
132 | 132 | ||
133 | memset(new, 0, sizeof(*new)); | ||
134 | |||
135 | ret = -EIO; | 133 | ret = -EIO; |
136 | new->mtd.priv = ioremap(start, len); | 134 | new->mtd.priv = ioremap(start, len); |
137 | if (!new->mtd.priv) { | 135 | if (!new->mtd.priv) { |