[SCSI] kmalloc + memset conversion to kzalloc
In NCR_D700, a4000t, aic7xxx_old, bvme6000, dpt_i2o, gdth, lpfc, megaraid, mvme16x osst, pluto, qla2xxx, zorro7xx Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
This commit is contained in:

committed by
James Bottomley

parent
f36789e22a
commit
bbfbbbc118
@@ -36,19 +36,18 @@ static struct platform_device *bvme6000_scsi_device;
|
||||
static __devinit int
|
||||
bvme6000_probe(struct device *dev)
|
||||
{
|
||||
struct Scsi_Host * host = NULL;
|
||||
struct Scsi_Host *host;
|
||||
struct NCR_700_Host_Parameters *hostdata;
|
||||
|
||||
if (!MACH_IS_BVME6000)
|
||||
goto out;
|
||||
|
||||
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 "bvme6000-scsi: "
|
||||
"Failed to allocate host data\n");
|
||||
goto out;
|
||||
}
|
||||
memset(hostdata, 0, sizeof(struct NCR_700_Host_Parameters));
|
||||
|
||||
/* Fill in the required pieces of hostdata */
|
||||
hostdata->base = (void __iomem *)BVME_NCR53C710_BASE;
|
||||
|
Reference in New Issue
Block a user