aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/sn/ioc3.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/sn/ioc3.c')
-rw-r--r--drivers/sn/ioc3.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/sn/ioc3.c b/drivers/sn/ioc3.c
index 2dd6eed50aa0..29fcd6d0301d 100644
--- a/drivers/sn/ioc3.c
+++ b/drivers/sn/ioc3.c
@@ -629,7 +629,7 @@ static int ioc3_probe(struct pci_dev *pdev, const struct pci_device_id *pci_id)
629#endif 629#endif
630 630
631 /* Set up per-IOC3 data */ 631 /* Set up per-IOC3 data */
632 idd = kmalloc(sizeof(struct ioc3_driver_data), GFP_KERNEL); 632 idd = kzalloc(sizeof(struct ioc3_driver_data), GFP_KERNEL);
633 if (!idd) { 633 if (!idd) {
634 printk(KERN_WARNING 634 printk(KERN_WARNING
635 "%s: Failed to allocate IOC3 data for pci_dev %s.\n", 635 "%s: Failed to allocate IOC3 data for pci_dev %s.\n",
@@ -637,7 +637,6 @@ static int ioc3_probe(struct pci_dev *pdev, const struct pci_device_id *pci_id)
637 ret = -ENODEV; 637 ret = -ENODEV;
638 goto out_idd; 638 goto out_idd;
639 } 639 }
640 memset(idd, 0, sizeof(struct ioc3_driver_data));
641 spin_lock_init(&idd->ir_lock); 640 spin_lock_init(&idd->ir_lock);
642 spin_lock_init(&idd->gpio_lock); 641 spin_lock_init(&idd->gpio_lock);
643 idd->pdev = pdev; 642 idd->pdev = pdev;