[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1373613425-30725-1-git-send-email-cosmin90stanescu@gmail.com>
Date: Fri, 12 Jul 2013 10:17:05 +0300
From: Cosmin Stanescu <cosmin90stanescu@...il.com>
To: hare@...e.de
Cc: JBottomley@...allels.com, linux-scsi@...r.kernel.org,
linux-kernel@...r.kernel.org,
Cosmin Stanescu <cosmin90stanescu@...il.com>
Subject: [PATCH] ic7xxx_osm: use kzalloc instead of kmalloc + memset
found using coccinelle.
Signed-off-by: Cosmin Stanescu <cosmin90stanescu@...il.com>
---
drivers/scsi/aic7xxx/aic7xxx_osm.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/scsi/aic7xxx/aic7xxx_osm.c b/drivers/scsi/aic7xxx/aic7xxx_osm.c
index c0c6258..7167cfe 100644
--- a/drivers/scsi/aic7xxx/aic7xxx_osm.c
+++ b/drivers/scsi/aic7xxx/aic7xxx_osm.c
@@ -1223,10 +1223,9 @@ ahc_platform_alloc(struct ahc_softc *ahc, void *platform_arg)
{
ahc->platform_data =
- kmalloc(sizeof(struct ahc_platform_data), GFP_ATOMIC);
+ kzalloc(sizeof(struct ahc_platform_data), GFP_ATOMIC);
if (ahc->platform_data == NULL)
return (ENOMEM);
- memset(ahc->platform_data, 0, sizeof(struct ahc_platform_data));
ahc->platform_data->irq = AHC_LINUX_NOIRQ;
ahc_lockinit(ahc);
ahc->seltime = (aic7xxx_seltime & 0x3) << 4;
--
1.7.10.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists