drivers/scsi/bvme6000_scsi.c: kmalloc + memset conversion to kzalloc
PATCH 19/30 drivers/scsi/bvme6000_scsi.c: kmalloc + memset conversion to kzalloc
From: Mariusz Kozlowski <[email protected]>
drivers/scsi/bvme6000_scsi.c | 3330 -> 3253 (-77 bytes)
Signed-off-by Mariusz Kozlowski <[email protected]>
Signed-off-by Andrew Morton <[email protected]>
---
drivers/scsi/bvme6000_scsi.c | 7 +++---- 1 files changed, 3 insertions(+), 4 deletions(-)
drivers/scsi/bvme6000_scsi.c renamed from drivers/scsi/bvme6000_scsi.c~drivers-scsi-bvme6000_scsic-kmalloc-memset-conversion-to-kzalloc +3 -4
@@ -36,19 +36,18 @@ static struct platform_device *bvme6000_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 ;
_