diff options
Diffstat (limited to 'drivers/mtd/maps/pcmciamtd.c')
-rw-r--r-- | drivers/mtd/maps/pcmciamtd.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/mtd/maps/pcmciamtd.c b/drivers/mtd/maps/pcmciamtd.c index 995347b1beba..eaeb56a4070a 100644 --- a/drivers/mtd/maps/pcmciamtd.c +++ b/drivers/mtd/maps/pcmciamtd.c | |||
@@ -735,11 +735,10 @@ static int pcmciamtd_probe(struct pcmcia_device *link) | |||
735 | struct pcmciamtd_dev *dev; | 735 | struct pcmciamtd_dev *dev; |
736 | 736 | ||
737 | /* Create new memory card device */ | 737 | /* Create new memory card device */ |
738 | dev = kmalloc(sizeof(*dev), GFP_KERNEL); | 738 | dev = kzalloc(sizeof(*dev), GFP_KERNEL); |
739 | if (!dev) return -ENOMEM; | 739 | if (!dev) return -ENOMEM; |
740 | DEBUG(1, "dev=0x%p", dev); | 740 | DEBUG(1, "dev=0x%p", dev); |
741 | 741 | ||
742 | memset(dev, 0, sizeof(*dev)); | ||
743 | dev->p_dev = link; | 742 | dev->p_dev = link; |
744 | link->priv = dev; | 743 | link->priv = dev; |
745 | 744 | ||