summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/aic7xxx/aic7xxx_osm.c
diff options
context:
space:
mode:
authorMichael Opdenacker <michael.opdenacker@free-electrons.com>2015-03-26 17:51:46 -0700
committerJames Bottomley <JBottomley@Odin.com>2015-04-09 13:22:10 -0700
commit114fc1d9a8cc7e8eb34fb3896d908992dac09b58 (patch)
tree3af8f970f587243b8f3bd180b2b56cd4ce71d5d9 /drivers/scsi/aic7xxx/aic7xxx_osm.c
parentcff549e4860fcdea6b22510defdc8c8a0f82455a (diff)
downloadblackbird-op-linux-114fc1d9a8cc7e8eb34fb3896d908992dac09b58.tar.gz
blackbird-op-linux-114fc1d9a8cc7e8eb34fb3896d908992dac09b58.zip
aic7xxx: replace kmalloc/memset by kzalloc
This replaces kmalloc + memset by a call to kzalloc This also fixes one checkpatch.pl issue in the process. This improvement was suggested by "make coccicheck" Signed-off-by: Michael Opdenacker <michael.opdenacker@free-electrons.com> Reviewed-by: Hannes Reinecke <hare@suse.de> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/aic7xxx/aic7xxx_osm.c')
-rw-r--r--drivers/scsi/aic7xxx/aic7xxx_osm.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/scsi/aic7xxx/aic7xxx_osm.c b/drivers/scsi/aic7xxx/aic7xxx_osm.c
index 88360116dbcb..a2f2c774cd6b 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;
OpenPOWER on IntegriCloud