* [PATCH] scsi: use kzalloc instead of kmalloc/memset
@ 2015-01-27 21:14 Liviu Gheorghisan
0 siblings, 0 replies; only message in thread
From: Liviu Gheorghisan @ 2015-01-27 21:14 UTC (permalink / raw)
To: hare, JBottomley; +Cc: linux-scsi, linux-kernel, Liviu Gheorghisan
Hint given by Coccinelle.
Signed-off-by: Liviu Gheorghisan <livghs@gmail.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 8836011..a2f2c77 100644
--- a/drivers/scsi/aic7xxx/aic7xxx_osm.c
+++ b/drivers/scsi/aic7xxx/aic7xxx_osm.c
@@ -1214,10 +1214,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.9.1
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2015-01-27 21:14 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-27 21:14 [PATCH] scsi: use kzalloc instead of kmalloc/memset Liviu Gheorghisan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®