aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/zorro7xx.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/zorro7xx.c')
-rw-r--r--drivers/scsi/zorro7xx.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/scsi/zorro7xx.c b/drivers/scsi/zorro7xx.c
index c822debc2668..ac67394c7373 100644
--- a/drivers/scsi/zorro7xx.c
+++ b/drivers/scsi/zorro7xx.c
@@ -69,7 +69,7 @@ static struct zorro_device_id zorro7xx_zorro_tbl[] __devinitdata = {
69static int __devinit zorro7xx_init_one(struct zorro_dev *z, 69static int __devinit zorro7xx_init_one(struct zorro_dev *z,
70 const struct zorro_device_id *ent) 70 const struct zorro_device_id *ent)
71{ 71{
72 struct Scsi_Host * host = NULL; 72 struct Scsi_Host *host;
73 struct NCR_700_Host_Parameters *hostdata; 73 struct NCR_700_Host_Parameters *hostdata;
74 struct zorro_driver_data *zdd; 74 struct zorro_driver_data *zdd;
75 unsigned long board, ioaddr; 75 unsigned long board, ioaddr;
@@ -89,14 +89,12 @@ static int __devinit zorro7xx_init_one(struct zorro_dev *z,
89 return -EBUSY; 89 return -EBUSY;
90 } 90 }
91 91
92 hostdata = kmalloc(sizeof(struct NCR_700_Host_Parameters), GFP_KERNEL); 92 hostdata = kzalloc(sizeof(struct NCR_700_Host_Parameters), GFP_KERNEL);
93 if (hostdata == NULL) { 93 if (!hostdata) {
94 printk(KERN_ERR "zorro7xx: Failed to allocate host data\n"); 94 printk(KERN_ERR "zorro7xx: Failed to allocate host data\n");
95 goto out_release; 95 goto out_release;
96 } 96 }
97 97
98 memset(hostdata, 0, sizeof(struct NCR_700_Host_Parameters));
99
100 /* Fill in the required pieces of hostdata */ 98 /* Fill in the required pieces of hostdata */
101 if (ioaddr > 0x01000000) 99 if (ioaddr > 0x01000000)
102 hostdata->base = ioremap(ioaddr, zorro_resource_len(z)); 100 hostdata->base = ioremap(ioaddr, zorro_resource_len(z));