diff options
Diffstat (limited to 'drivers/pcmcia/socket_sysfs.c')
-rw-r--r-- | drivers/pcmcia/socket_sysfs.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/pcmcia/socket_sysfs.c b/drivers/pcmcia/socket_sysfs.c index e074bc1f101f..7a7744662d54 100644 --- a/drivers/pcmcia/socket_sysfs.c +++ b/drivers/pcmcia/socket_sysfs.c | |||
@@ -285,10 +285,9 @@ static ssize_t pccard_store_cis(struct kobject *kobj, char *buf, loff_t off, siz | |||
285 | if (!(s->state & SOCKET_PRESENT)) | 285 | if (!(s->state & SOCKET_PRESENT)) |
286 | return -ENODEV; | 286 | return -ENODEV; |
287 | 287 | ||
288 | cis = kmalloc(sizeof(cisdump_t), GFP_KERNEL); | 288 | cis = kzalloc(sizeof(cisdump_t), GFP_KERNEL); |
289 | if (!cis) | 289 | if (!cis) |
290 | return -ENOMEM; | 290 | return -ENOMEM; |
291 | memset(cis, 0, sizeof(cisdump_t)); | ||
292 | 291 | ||
293 | cis->Length = count + 1; | 292 | cis->Length = count + 1; |
294 | memcpy(cis->Data, buf, count); | 293 | memcpy(cis->Data, buf, count); |