diff options
Diffstat (limited to 'drivers/scsi/a4000t.c')
-rw-r--r-- | drivers/scsi/a4000t.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/scsi/a4000t.c b/drivers/scsi/a4000t.c index 0c758d1452ba..d4bda2017746 100644 --- a/drivers/scsi/a4000t.c +++ b/drivers/scsi/a4000t.c | |||
@@ -37,7 +37,7 @@ static struct platform_device *a4000t_scsi_device; | |||
37 | 37 | ||
38 | static int __devinit a4000t_probe(struct device *dev) | 38 | static int __devinit a4000t_probe(struct device *dev) |
39 | { | 39 | { |
40 | struct Scsi_Host * host = NULL; | 40 | struct Scsi_Host *host; |
41 | struct NCR_700_Host_Parameters *hostdata; | 41 | struct NCR_700_Host_Parameters *hostdata; |
42 | 42 | ||
43 | if (!(MACH_IS_AMIGA && AMIGAHW_PRESENT(A4000_SCSI))) | 43 | if (!(MACH_IS_AMIGA && AMIGAHW_PRESENT(A4000_SCSI))) |
@@ -47,12 +47,11 @@ static int __devinit a4000t_probe(struct device *dev) | |||
47 | "A4000T builtin SCSI")) | 47 | "A4000T builtin SCSI")) |
48 | goto out; | 48 | goto out; |
49 | 49 | ||
50 | hostdata = kmalloc(sizeof(struct NCR_700_Host_Parameters), GFP_KERNEL); | 50 | hostdata = kzalloc(sizeof(struct NCR_700_Host_Parameters), GFP_KERNEL); |
51 | if (hostdata == NULL) { | 51 | if (!hostdata) { |
52 | printk(KERN_ERR "a4000t-scsi: Failed to allocate host data\n"); | 52 | printk(KERN_ERR "a4000t-scsi: Failed to allocate host data\n"); |
53 | goto out_release; | 53 | goto out_release; |
54 | } | 54 | } |
55 | memset(hostdata, 0, sizeof(struct NCR_700_Host_Parameters)); | ||
56 | 55 | ||
57 | /* Fill in the required pieces of hostdata */ | 56 | /* Fill in the required pieces of hostdata */ |
58 | hostdata->base = (void __iomem *)ZTWO_VADDR(A4000T_SCSI_ADDR); | 57 | hostdata->base = (void __iomem *)ZTWO_VADDR(A4000T_SCSI_ADDR); |