Skip to contentSkip to conversation

scsi: aic79xx: Use kzalloc instead of kmalloc/memset

PATCH New Daeseok Youn 1 participant 1 message Jan 28, 2015

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 4/4 scsi: aic79xx: Use kzalloc instead of kmalloc/memset

---
 drivers/scsi/aic7xxx/aic79xx_osm.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
drivers/scsi/aic7xxx/aic79xx_osm.c +1 -1
index d5c7b19..ce96a0b 100644
@@ -1326,10 +1326,9 @@ int
 ahd_platform_alloc(struct ahd_softc *ahd, void *platform_arg)
 {
 	ahd->platform_data -	    kmalloc(sizeof(struct ahd_platform_data), GFP_ATOMIC);
+	    kzalloc(sizeof(struct ahd_platform_data), GFP_ATOMIC);
 	if (ahd->platform_data = NULL)
 		return (ENOMEM);
-	memset(ahd->platform_data, 0, sizeof(struct ahd_platform_data));
 	ahd->platform_data->irq = AHD_LINUX_NOIRQ;
 	ahd_lockinit(ahd);
 	ahd->seltime = (aic79xx_seltime & 0x3) << 4;
Signature · 1 line
1.7.1