X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=drivers%2Fscsi%2Fzorro7xx.c;h=64d40a2d4d4d5699167d04d12cecea1c6574b7e0;hb=35780c8ea7ad5c6d5483244d5f5bf37176fda86a;hp=c822debc2668ef687368443907c9ad2d1bca87f7;hpb=973ed7c49a5c2271a10ce54ac06bba5617fca3a8;p=linux-2.6-omap-h63xx.git diff --git a/drivers/scsi/zorro7xx.c b/drivers/scsi/zorro7xx.c index c822debc266..64d40a2d4d4 100644 --- a/drivers/scsi/zorro7xx.c +++ b/drivers/scsi/zorro7xx.c @@ -13,7 +13,10 @@ #include #include #include + +#include #include + #include #include @@ -69,7 +72,7 @@ static struct zorro_device_id zorro7xx_zorro_tbl[] __devinitdata = { static int __devinit zorro7xx_init_one(struct zorro_dev *z, const struct zorro_device_id *ent) { - struct Scsi_Host * host = NULL; + struct Scsi_Host *host; struct NCR_700_Host_Parameters *hostdata; struct zorro_driver_data *zdd; unsigned long board, ioaddr; @@ -89,14 +92,12 @@ static int __devinit zorro7xx_init_one(struct zorro_dev *z, return -EBUSY; } - hostdata = kmalloc(sizeof(struct NCR_700_Host_Parameters), GFP_KERNEL); - if (hostdata == NULL) { + hostdata = kzalloc(sizeof(struct NCR_700_Host_Parameters), GFP_KERNEL); + if (!hostdata) { printk(KERN_ERR "zorro7xx: Failed to allocate host data\n"); goto out_release; } - memset(hostdata, 0, sizeof(struct NCR_700_Host_Parameters)); - /* Fill in the required pieces of hostdata */ if (ioaddr > 0x01000000) hostdata->base = ioremap(ioaddr, zorro_resource_len(z));