aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/scsi/aic94xx/aic94xx_init.c4
-rw-r--r--drivers/scsi/ch.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/drivers/scsi/aic94xx/aic94xx_init.c b/drivers/scsi/aic94xx/aic94xx_init.c
index 24ac2315c5c7..3b7e83d2dab4 100644
--- a/drivers/scsi/aic94xx/aic94xx_init.c
+++ b/drivers/scsi/aic94xx/aic94xx_init.c
@@ -688,9 +688,9 @@ static int asd_register_sas_ha(struct asd_ha_struct *asd_ha)
688{ 688{
689 int i; 689 int i;
690 struct asd_sas_phy **sas_phys = 690 struct asd_sas_phy **sas_phys =
691 kmalloc(ASD_MAX_PHYS * sizeof(struct asd_sas_phy), GFP_KERNEL); 691 kcalloc(ASD_MAX_PHYS, sizeof(*sas_phys), GFP_KERNEL);
692 struct asd_sas_port **sas_ports = 692 struct asd_sas_port **sas_ports =
693 kmalloc(ASD_MAX_PHYS * sizeof(struct asd_sas_port), GFP_KERNEL); 693 kcalloc(ASD_MAX_PHYS, sizeof(*sas_ports), GFP_KERNEL);
694 694
695 if (!sas_phys || !sas_ports) { 695 if (!sas_phys || !sas_ports) {
696 kfree(sas_phys); 696 kfree(sas_phys);
diff --git a/drivers/scsi/ch.c b/drivers/scsi/ch.c
index 4799d4391203..769b35f8b39f 100644
--- a/drivers/scsi/ch.c
+++ b/drivers/scsi/ch.c
@@ -352,7 +352,7 @@ ch_readconfig(scsi_changer *ch)
352 } 352 }
353 353
354 /* look up the devices of the data transfer elements */ 354 /* look up the devices of the data transfer elements */
355 ch->dt = kmalloc(ch->counts[CHET_DT]*sizeof(struct scsi_device), 355 ch->dt = kcalloc(ch->counts[CHET_DT], sizeof(*ch->dt),
356 GFP_KERNEL); 356 GFP_KERNEL);
357 357
358 if (!ch->dt) { 358 if (!ch->dt) {