diff options
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) { |