aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi')
-rw-r--r--drivers/scsi/3w-9xxx.c3
-rw-r--r--drivers/scsi/NCR53C9x.c3
-rw-r--r--drivers/scsi/NCR_D700.c3
-rw-r--r--drivers/scsi/NCR_Q720.c3
-rw-r--r--drivers/scsi/imm.c3
-rw-r--r--drivers/scsi/ips.c3
-rw-r--r--drivers/scsi/lasi700.c3
-rw-r--r--drivers/scsi/lpfc/lpfc_init.c3
-rw-r--r--drivers/scsi/megaraid/megaraid_mbox.c14
-rw-r--r--drivers/scsi/megaraid/megaraid_mm.c3
-rw-r--r--drivers/scsi/megaraid/megaraid_sas.c4
-rw-r--r--drivers/scsi/pcmcia/aha152x_stub.c3
-rw-r--r--drivers/scsi/pcmcia/nsp_cs.c3
-rw-r--r--drivers/scsi/pcmcia/qlogic_stub.c3
-rw-r--r--drivers/scsi/pcmcia/sym53c500_cs.c3
-rw-r--r--drivers/scsi/ppa.c3
-rw-r--r--drivers/scsi/sim710.c3
-rw-r--r--drivers/scsi/tmscsim.c3
18 files changed, 21 insertions, 45 deletions
diff --git a/drivers/scsi/3w-9xxx.c b/drivers/scsi/3w-9xxx.c
index 76c09097175f..6b49f6a2524d 100644
--- a/drivers/scsi/3w-9xxx.c
+++ b/drivers/scsi/3w-9xxx.c
@@ -1160,13 +1160,12 @@ static int twa_initialize_device_extension(TW_Device_Extension *tw_dev)
1160 } 1160 }
1161 1161
1162 /* Allocate event info space */ 1162 /* Allocate event info space */
1163 tw_dev->event_queue[0] = kmalloc(sizeof(TW_Event) * TW_Q_LENGTH, GFP_KERNEL); 1163 tw_dev->event_queue[0] = kcalloc(TW_Q_LENGTH, sizeof(TW_Event), GFP_KERNEL);
1164 if (!tw_dev->event_queue[0]) { 1164 if (!tw_dev->event_queue[0]) {
1165 TW_PRINTK(tw_dev->host, TW_DRIVER, 0x18, "Event info memory allocation failed"); 1165 TW_PRINTK(tw_dev->host, TW_DRIVER, 0x18, "Event info memory allocation failed");
1166 goto out; 1166 goto out;
1167 } 1167 }
1168 1168
1169 memset(tw_dev->event_queue[0], 0, sizeof(TW_Event) * TW_Q_LENGTH);
1170 1169
1171 for (i = 0; i < TW_Q_LENGTH; i++) { 1170 for (i = 0; i < TW_Q_LENGTH; i++) {
1172 tw_dev->event_queue[i] = (TW_Event *)((unsigned char *)tw_dev->event_queue[0] + (i * sizeof(TW_Event))); 1171 tw_dev->event_queue[i] = (TW_Event *)((unsigned char *)tw_dev->event_queue[0] + (i * sizeof(TW_Event)));
diff --git a/drivers/scsi/NCR53C9x.c b/drivers/scsi/NCR53C9x.c
index 8b5334c56f0a..773d11dd9953 100644
--- a/drivers/scsi/NCR53C9x.c
+++ b/drivers/scsi/NCR53C9x.c
@@ -3606,11 +3606,10 @@ out:
3606int esp_slave_alloc(struct scsi_device *SDptr) 3606int esp_slave_alloc(struct scsi_device *SDptr)
3607{ 3607{
3608 struct esp_device *esp_dev = 3608 struct esp_device *esp_dev =
3609 kmalloc(sizeof(struct esp_device), GFP_ATOMIC); 3609 kzalloc(sizeof(struct esp_device), GFP_ATOMIC);
3610 3610
3611 if (!esp_dev) 3611 if (!esp_dev)
3612 return -ENOMEM; 3612 return -ENOMEM;
3613 memset(esp_dev, 0, sizeof(struct esp_device));
3614 SDptr->hostdata = esp_dev; 3613 SDptr->hostdata = esp_dev;
3615 return 0; 3614 return 0;
3616} 3615}
diff --git a/drivers/scsi/NCR_D700.c b/drivers/scsi/NCR_D700.c
index f12864abed2f..3a8089705feb 100644
--- a/drivers/scsi/NCR_D700.c
+++ b/drivers/scsi/NCR_D700.c
@@ -181,13 +181,12 @@ NCR_D700_probe_one(struct NCR_D700_private *p, int siop, int irq,
181 struct Scsi_Host *host; 181 struct Scsi_Host *host;
182 int ret; 182 int ret;
183 183
184 hostdata = kmalloc(sizeof(*hostdata), GFP_KERNEL); 184 hostdata = kzalloc(sizeof(*hostdata), GFP_KERNEL);
185 if (!hostdata) { 185 if (!hostdata) {
186 printk(KERN_ERR "NCR D700: SIOP%d: Failed to allocate host" 186 printk(KERN_ERR "NCR D700: SIOP%d: Failed to allocate host"
187 "data, detatching\n", siop); 187 "data, detatching\n", siop);
188 return -ENOMEM; 188 return -ENOMEM;
189 } 189 }
190 memset(hostdata, 0, sizeof(*hostdata));
191 190
192 if (!request_region(region, 64, "NCR_D700")) { 191 if (!request_region(region, 64, "NCR_D700")) {
193 printk(KERN_ERR "NCR D700: Failed to reserve IO region 0x%x\n", 192 printk(KERN_ERR "NCR D700: Failed to reserve IO region 0x%x\n",
diff --git a/drivers/scsi/NCR_Q720.c b/drivers/scsi/NCR_Q720.c
index 778844c3544a..a8bbdc2273b8 100644
--- a/drivers/scsi/NCR_Q720.c
+++ b/drivers/scsi/NCR_Q720.c
@@ -148,11 +148,10 @@ NCR_Q720_probe(struct device *dev)
148 __u32 base_addr, mem_size; 148 __u32 base_addr, mem_size;
149 void __iomem *mem_base; 149 void __iomem *mem_base;
150 150
151 p = kmalloc(sizeof(*p), GFP_KERNEL); 151 p = kzalloc(sizeof(*p), GFP_KERNEL);
152 if (!p) 152 if (!p)
153 return -ENOMEM; 153 return -ENOMEM;
154 154
155 memset(p, 0, sizeof(*p));
156 pos2 = mca_device_read_pos(mca_dev, 2); 155 pos2 = mca_device_read_pos(mca_dev, 2);
157 /* enable device */ 156 /* enable device */
158 pos2 |= NCR_Q720_POS2_BOARD_ENABLE | NCR_Q720_POS2_INTERRUPT_ENABLE; 157 pos2 |= NCR_Q720_POS2_BOARD_ENABLE | NCR_Q720_POS2_INTERRUPT_ENABLE;
diff --git a/drivers/scsi/imm.c b/drivers/scsi/imm.c
index 0464c182c577..005d2b05f32d 100644
--- a/drivers/scsi/imm.c
+++ b/drivers/scsi/imm.c
@@ -1159,11 +1159,10 @@ static int __imm_attach(struct parport *pb)
1159 1159
1160 init_waitqueue_head(&waiting); 1160 init_waitqueue_head(&waiting);
1161 1161
1162 dev = kmalloc(sizeof(imm_struct), GFP_KERNEL); 1162 dev = kzalloc(sizeof(imm_struct), GFP_KERNEL);
1163 if (!dev) 1163 if (!dev)
1164 return -ENOMEM; 1164 return -ENOMEM;
1165 1165
1166 memset(dev, 0, sizeof(imm_struct));
1167 1166
1168 dev->base = -1; 1167 dev->base = -1;
1169 dev->mode = IMM_AUTODETECT; 1168 dev->mode = IMM_AUTODETECT;
diff --git a/drivers/scsi/ips.c b/drivers/scsi/ips.c
index 9f8ed6b81576..492a51bd6aa8 100644
--- a/drivers/scsi/ips.c
+++ b/drivers/scsi/ips.c
@@ -7068,14 +7068,13 @@ ips_init_phase1(struct pci_dev *pci_dev, int *indexPtr)
7068 subdevice_id = pci_dev->subsystem_device; 7068 subdevice_id = pci_dev->subsystem_device;
7069 7069
7070 /* found a controller */ 7070 /* found a controller */
7071 ha = kmalloc(sizeof (ips_ha_t), GFP_KERNEL); 7071 ha = kzalloc(sizeof (ips_ha_t), GFP_KERNEL);
7072 if (ha == NULL) { 7072 if (ha == NULL) {
7073 IPS_PRINTK(KERN_WARNING, pci_dev, 7073 IPS_PRINTK(KERN_WARNING, pci_dev,
7074 "Unable to allocate temporary ha struct\n"); 7074 "Unable to allocate temporary ha struct\n");
7075 return -1; 7075 return -1;
7076 } 7076 }
7077 7077
7078 memset(ha, 0, sizeof (ips_ha_t));
7079 7078
7080 ips_sh[index] = NULL; 7079 ips_sh[index] = NULL;
7081 ips_ha[index] = ha; 7080 ips_ha[index] = ha;
diff --git a/drivers/scsi/lasi700.c b/drivers/scsi/lasi700.c
index 5c32a69e41ba..3126824da36d 100644
--- a/drivers/scsi/lasi700.c
+++ b/drivers/scsi/lasi700.c
@@ -101,13 +101,12 @@ lasi700_probe(struct parisc_device *dev)
101 struct NCR_700_Host_Parameters *hostdata; 101 struct NCR_700_Host_Parameters *hostdata;
102 struct Scsi_Host *host; 102 struct Scsi_Host *host;
103 103
104 hostdata = kmalloc(sizeof(*hostdata), GFP_KERNEL); 104 hostdata = kzalloc(sizeof(*hostdata), GFP_KERNEL);
105 if (!hostdata) { 105 if (!hostdata) {
106 printk(KERN_ERR "%s: Failed to allocate host data\n", 106 printk(KERN_ERR "%s: Failed to allocate host data\n",
107 dev->dev.bus_id); 107 dev->dev.bus_id);
108 return -ENOMEM; 108 return -ENOMEM;
109 } 109 }
110 memset(hostdata, 0, sizeof(struct NCR_700_Host_Parameters));
111 110
112 hostdata->dev = &dev->dev; 111 hostdata->dev = &dev->dev;
113 dma_set_mask(&dev->dev, DMA_32BIT_MASK); 112 dma_set_mask(&dev->dev, DMA_32BIT_MASK);
diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c
index f81f85ee190f..07bd0dcdf0d6 100644
--- a/drivers/scsi/lpfc/lpfc_init.c
+++ b/drivers/scsi/lpfc/lpfc_init.c
@@ -1830,7 +1830,7 @@ lpfc_pci_probe_one(struct pci_dev *pdev, const struct pci_device_id *pid)
1830 /* Initialize and populate the iocb list per host. */ 1830 /* Initialize and populate the iocb list per host. */
1831 INIT_LIST_HEAD(&phba->lpfc_iocb_list); 1831 INIT_LIST_HEAD(&phba->lpfc_iocb_list);
1832 for (i = 0; i < LPFC_IOCB_LIST_CNT; i++) { 1832 for (i = 0; i < LPFC_IOCB_LIST_CNT; i++) {
1833 iocbq_entry = kmalloc(sizeof(struct lpfc_iocbq), GFP_KERNEL); 1833 iocbq_entry = kzalloc(sizeof(struct lpfc_iocbq), GFP_KERNEL);
1834 if (iocbq_entry == NULL) { 1834 if (iocbq_entry == NULL) {
1835 printk(KERN_ERR "%s: only allocated %d iocbs of " 1835 printk(KERN_ERR "%s: only allocated %d iocbs of "
1836 "expected %d count. Unloading driver.\n", 1836 "expected %d count. Unloading driver.\n",
@@ -1839,7 +1839,6 @@ lpfc_pci_probe_one(struct pci_dev *pdev, const struct pci_device_id *pid)
1839 goto out_free_iocbq; 1839 goto out_free_iocbq;
1840 } 1840 }
1841 1841
1842 memset(iocbq_entry, 0, sizeof(struct lpfc_iocbq));
1843 iotag = lpfc_sli_next_iotag(phba, iocbq_entry); 1842 iotag = lpfc_sli_next_iotag(phba, iocbq_entry);
1844 if (iotag == 0) { 1843 if (iotag == 0) {
1845 kfree (iocbq_entry); 1844 kfree (iocbq_entry);
diff --git a/drivers/scsi/megaraid/megaraid_mbox.c b/drivers/scsi/megaraid/megaraid_mbox.c
index c46685a03a9f..c6a53dccc16a 100644
--- a/drivers/scsi/megaraid/megaraid_mbox.c
+++ b/drivers/scsi/megaraid/megaraid_mbox.c
@@ -454,7 +454,7 @@ megaraid_probe_one(struct pci_dev *pdev, const struct pci_device_id *id)
454 pci_set_master(pdev); 454 pci_set_master(pdev);
455 455
456 // Allocate the per driver initialization structure 456 // Allocate the per driver initialization structure
457 adapter = kmalloc(sizeof(adapter_t), GFP_KERNEL); 457 adapter = kzalloc(sizeof(adapter_t), GFP_KERNEL);
458 458
459 if (adapter == NULL) { 459 if (adapter == NULL) {
460 con_log(CL_ANN, (KERN_WARNING 460 con_log(CL_ANN, (KERN_WARNING
@@ -462,7 +462,6 @@ megaraid_probe_one(struct pci_dev *pdev, const struct pci_device_id *id)
462 462
463 goto out_probe_one; 463 goto out_probe_one;
464 } 464 }
465 memset(adapter, 0, sizeof(adapter_t));
466 465
467 466
468 // set up PCI related soft state and other pre-known parameters 467 // set up PCI related soft state and other pre-known parameters
@@ -746,10 +745,9 @@ megaraid_init_mbox(adapter_t *adapter)
746 * Allocate and initialize the init data structure for mailbox 745 * Allocate and initialize the init data structure for mailbox
747 * controllers 746 * controllers
748 */ 747 */
749 raid_dev = kmalloc(sizeof(mraid_device_t), GFP_KERNEL); 748 raid_dev = kzalloc(sizeof(mraid_device_t), GFP_KERNEL);
750 if (raid_dev == NULL) return -1; 749 if (raid_dev == NULL) return -1;
751 750
752 memset(raid_dev, 0, sizeof(mraid_device_t));
753 751
754 /* 752 /*
755 * Attach the adapter soft state to raid device soft state 753 * Attach the adapter soft state to raid device soft state
@@ -1050,8 +1048,7 @@ megaraid_alloc_cmd_packets(adapter_t *adapter)
1050 * since the calling routine does not yet know the number of available 1048 * since the calling routine does not yet know the number of available
1051 * commands. 1049 * commands.
1052 */ 1050 */
1053 adapter->kscb_list = kmalloc(sizeof(scb_t) * MBOX_MAX_SCSI_CMDS, 1051 adapter->kscb_list = kcalloc(MBOX_MAX_SCSI_CMDS, sizeof(scb_t), GFP_KERNEL);
1054 GFP_KERNEL);
1055 1052
1056 if (adapter->kscb_list == NULL) { 1053 if (adapter->kscb_list == NULL) {
1057 con_log(CL_ANN, (KERN_WARNING 1054 con_log(CL_ANN, (KERN_WARNING
@@ -1059,7 +1056,6 @@ megaraid_alloc_cmd_packets(adapter_t *adapter)
1059 __LINE__)); 1056 __LINE__));
1060 goto out_free_ibuf; 1057 goto out_free_ibuf;
1061 } 1058 }
1062 memset(adapter->kscb_list, 0, sizeof(scb_t) * MBOX_MAX_SCSI_CMDS);
1063 1059
1064 // memory allocation for our command packets 1060 // memory allocation for our command packets
1065 if (megaraid_mbox_setup_dma_pools(adapter) != 0) { 1061 if (megaraid_mbox_setup_dma_pools(adapter) != 0) {
@@ -3495,8 +3491,7 @@ megaraid_cmm_register(adapter_t *adapter)
3495 int i; 3491 int i;
3496 3492
3497 // Allocate memory for the base list of scb for management module. 3493 // Allocate memory for the base list of scb for management module.
3498 adapter->uscb_list = kmalloc(sizeof(scb_t) * MBOX_MAX_USER_CMDS, 3494 adapter->uscb_list = kcalloc(MBOX_MAX_USER_CMDS, sizeof(scb_t), GFP_KERNEL);
3499 GFP_KERNEL);
3500 3495
3501 if (adapter->uscb_list == NULL) { 3496 if (adapter->uscb_list == NULL) {
3502 con_log(CL_ANN, (KERN_WARNING 3497 con_log(CL_ANN, (KERN_WARNING
@@ -3504,7 +3499,6 @@ megaraid_cmm_register(adapter_t *adapter)
3504 __LINE__)); 3499 __LINE__));
3505 return -1; 3500 return -1;
3506 } 3501 }
3507 memset(adapter->uscb_list, 0, sizeof(scb_t) * MBOX_MAX_USER_CMDS);
3508 3502
3509 3503
3510 // Initialize the synchronization parameters for resources for 3504 // Initialize the synchronization parameters for resources for
diff --git a/drivers/scsi/megaraid/megaraid_mm.c b/drivers/scsi/megaraid/megaraid_mm.c
index 84d9c27133d4..b6587a6d8486 100644
--- a/drivers/scsi/megaraid/megaraid_mm.c
+++ b/drivers/scsi/megaraid/megaraid_mm.c
@@ -890,12 +890,11 @@ mraid_mm_register_adp(mraid_mmadp_t *lld_adp)
890 if (lld_adp->drvr_type != DRVRTYPE_MBOX) 890 if (lld_adp->drvr_type != DRVRTYPE_MBOX)
891 return (-EINVAL); 891 return (-EINVAL);
892 892
893 adapter = kmalloc(sizeof(mraid_mmadp_t), GFP_KERNEL); 893 adapter = kzalloc(sizeof(mraid_mmadp_t), GFP_KERNEL);
894 894
895 if (!adapter) 895 if (!adapter)
896 return -ENOMEM; 896 return -ENOMEM;
897 897
898 memset(adapter, 0, sizeof(mraid_mmadp_t));
899 898
900 adapter->unique_id = lld_adp->unique_id; 899 adapter->unique_id = lld_adp->unique_id;
901 adapter->drvr_type = lld_adp->drvr_type; 900 adapter->drvr_type = lld_adp->drvr_type;
diff --git a/drivers/scsi/megaraid/megaraid_sas.c b/drivers/scsi/megaraid/megaraid_sas.c
index b7f2e613c903..ebb948c016bb 100644
--- a/drivers/scsi/megaraid/megaraid_sas.c
+++ b/drivers/scsi/megaraid/megaraid_sas.c
@@ -1636,15 +1636,13 @@ static int megasas_alloc_cmds(struct megasas_instance *instance)
1636 * Allocate the dynamic array first and then allocate individual 1636 * Allocate the dynamic array first and then allocate individual
1637 * commands. 1637 * commands.
1638 */ 1638 */
1639 instance->cmd_list = kmalloc(sizeof(struct megasas_cmd *) * max_cmd, 1639 instance->cmd_list = kcalloc(max_cmd, sizeof(struct megasas_cmd*), GFP_KERNEL);
1640 GFP_KERNEL);
1641 1640
1642 if (!instance->cmd_list) { 1641 if (!instance->cmd_list) {
1643 printk(KERN_DEBUG "megasas: out of memory\n"); 1642 printk(KERN_DEBUG "megasas: out of memory\n");
1644 return -ENOMEM; 1643 return -ENOMEM;
1645 } 1644 }
1646 1645
1647 memset(instance->cmd_list, 0, sizeof(struct megasas_cmd *) * max_cmd);
1648 1646
1649 for (i = 0; i < max_cmd; i++) { 1647 for (i = 0; i < max_cmd; i++) {
1650 instance->cmd_list[i] = kmalloc(sizeof(struct megasas_cmd), 1648 instance->cmd_list[i] = kmalloc(sizeof(struct megasas_cmd),
diff --git a/drivers/scsi/pcmcia/aha152x_stub.c b/drivers/scsi/pcmcia/aha152x_stub.c
index 370802d24acd..2dd0dc9a9aed 100644
--- a/drivers/scsi/pcmcia/aha152x_stub.c
+++ b/drivers/scsi/pcmcia/aha152x_stub.c
@@ -106,9 +106,8 @@ static int aha152x_probe(struct pcmcia_device *link)
106 DEBUG(0, "aha152x_attach()\n"); 106 DEBUG(0, "aha152x_attach()\n");
107 107
108 /* Create new SCSI device */ 108 /* Create new SCSI device */
109 info = kmalloc(sizeof(*info), GFP_KERNEL); 109 info = kzalloc(sizeof(*info), GFP_KERNEL);
110 if (!info) return -ENOMEM; 110 if (!info) return -ENOMEM;
111 memset(info, 0, sizeof(*info));
112 info->p_dev = link; 111 info->p_dev = link;
113 link->priv = info; 112 link->priv = info;
114 113
diff --git a/drivers/scsi/pcmcia/nsp_cs.c b/drivers/scsi/pcmcia/nsp_cs.c
index c6f8c6e65e05..445cfbbca9b3 100644
--- a/drivers/scsi/pcmcia/nsp_cs.c
+++ b/drivers/scsi/pcmcia/nsp_cs.c
@@ -1602,9 +1602,8 @@ static int nsp_cs_probe(struct pcmcia_device *link)
1602 nsp_dbg(NSP_DEBUG_INIT, "in"); 1602 nsp_dbg(NSP_DEBUG_INIT, "in");
1603 1603
1604 /* Create new SCSI device */ 1604 /* Create new SCSI device */
1605 info = kmalloc(sizeof(*info), GFP_KERNEL); 1605 info = kzalloc(sizeof(*info), GFP_KERNEL);
1606 if (info == NULL) { return -ENOMEM; } 1606 if (info == NULL) { return -ENOMEM; }
1607 memset(info, 0, sizeof(*info));
1608 info->p_dev = link; 1607 info->p_dev = link;
1609 link->priv = info; 1608 link->priv = info;
1610 data->ScsiInfo = info; 1609 data->ScsiInfo = info;
diff --git a/drivers/scsi/pcmcia/qlogic_stub.c b/drivers/scsi/pcmcia/qlogic_stub.c
index 697cfb76c3a4..67c5a58d17df 100644
--- a/drivers/scsi/pcmcia/qlogic_stub.c
+++ b/drivers/scsi/pcmcia/qlogic_stub.c
@@ -162,10 +162,9 @@ static int qlogic_probe(struct pcmcia_device *link)
162 DEBUG(0, "qlogic_attach()\n"); 162 DEBUG(0, "qlogic_attach()\n");
163 163
164 /* Create new SCSI device */ 164 /* Create new SCSI device */
165 info = kmalloc(sizeof(*info), GFP_KERNEL); 165 info = kzalloc(sizeof(*info), GFP_KERNEL);
166 if (!info) 166 if (!info)
167 return -ENOMEM; 167 return -ENOMEM;
168 memset(info, 0, sizeof(*info));
169 info->p_dev = link; 168 info->p_dev = link;
170 link->priv = info; 169 link->priv = info;
171 link->io.NumPorts1 = 16; 170 link->io.NumPorts1 = 16;
diff --git a/drivers/scsi/pcmcia/sym53c500_cs.c b/drivers/scsi/pcmcia/sym53c500_cs.c
index 2695b7187b2f..961839ecfe86 100644
--- a/drivers/scsi/pcmcia/sym53c500_cs.c
+++ b/drivers/scsi/pcmcia/sym53c500_cs.c
@@ -875,10 +875,9 @@ SYM53C500_probe(struct pcmcia_device *link)
875 DEBUG(0, "SYM53C500_attach()\n"); 875 DEBUG(0, "SYM53C500_attach()\n");
876 876
877 /* Create new SCSI device */ 877 /* Create new SCSI device */
878 info = kmalloc(sizeof(*info), GFP_KERNEL); 878 info = kzalloc(sizeof(*info), GFP_KERNEL);
879 if (!info) 879 if (!info)
880 return -ENOMEM; 880 return -ENOMEM;
881 memset(info, 0, sizeof(*info));
882 info->p_dev = link; 881 info->p_dev = link;
883 link->priv = info; 882 link->priv = info;
884 link->io.NumPorts1 = 16; 883 link->io.NumPorts1 = 16;
diff --git a/drivers/scsi/ppa.c b/drivers/scsi/ppa.c
index 2f1fa1eb7e90..67b6d76a6c8d 100644
--- a/drivers/scsi/ppa.c
+++ b/drivers/scsi/ppa.c
@@ -1014,10 +1014,9 @@ static int __ppa_attach(struct parport *pb)
1014 int modes, ppb, ppb_hi; 1014 int modes, ppb, ppb_hi;
1015 int err = -ENOMEM; 1015 int err = -ENOMEM;
1016 1016
1017 dev = kmalloc(sizeof(ppa_struct), GFP_KERNEL); 1017 dev = kzalloc(sizeof(ppa_struct), GFP_KERNEL);
1018 if (!dev) 1018 if (!dev)
1019 return -ENOMEM; 1019 return -ENOMEM;
1020 memset(dev, 0, sizeof(ppa_struct));
1021 dev->base = -1; 1020 dev->base = -1;
1022 dev->mode = PPA_AUTODETECT; 1021 dev->mode = PPA_AUTODETECT;
1023 dev->recon_tmo = PPA_RECON_TMO; 1022 dev->recon_tmo = PPA_RECON_TMO;
diff --git a/drivers/scsi/sim710.c b/drivers/scsi/sim710.c
index 018c65f73ac4..710f19de3d40 100644
--- a/drivers/scsi/sim710.c
+++ b/drivers/scsi/sim710.c
@@ -100,7 +100,7 @@ sim710_probe_common(struct device *dev, unsigned long base_addr,
100{ 100{
101 struct Scsi_Host * host = NULL; 101 struct Scsi_Host * host = NULL;
102 struct NCR_700_Host_Parameters *hostdata = 102 struct NCR_700_Host_Parameters *hostdata =
103 kmalloc(sizeof(struct NCR_700_Host_Parameters), GFP_KERNEL); 103 kzalloc(sizeof(struct NCR_700_Host_Parameters), GFP_KERNEL);
104 104
105 printk(KERN_NOTICE "sim710: %s\n", dev->bus_id); 105 printk(KERN_NOTICE "sim710: %s\n", dev->bus_id);
106 printk(KERN_NOTICE "sim710: irq = %d, clock = %d, base = 0x%lx, scsi_id = %d\n", 106 printk(KERN_NOTICE "sim710: irq = %d, clock = %d, base = 0x%lx, scsi_id = %d\n",
@@ -110,7 +110,6 @@ sim710_probe_common(struct device *dev, unsigned long base_addr,
110 printk(KERN_ERR "sim710: Failed to allocate host data\n"); 110 printk(KERN_ERR "sim710: Failed to allocate host data\n");
111 goto out; 111 goto out;
112 } 112 }
113 memset(hostdata, 0, sizeof(struct NCR_700_Host_Parameters));
114 113
115 if(request_region(base_addr, 64, "sim710") == NULL) { 114 if(request_region(base_addr, 64, "sim710") == NULL) {
116 printk(KERN_ERR "sim710: Failed to reserve IO region 0x%lx\n", 115 printk(KERN_ERR "sim710: Failed to reserve IO region 0x%lx\n",
diff --git a/drivers/scsi/tmscsim.c b/drivers/scsi/tmscsim.c
index 14cba1ca38b3..5db1520f8ba9 100644
--- a/drivers/scsi/tmscsim.c
+++ b/drivers/scsi/tmscsim.c
@@ -2082,10 +2082,9 @@ static int dc390_slave_alloc(struct scsi_device *scsi_device)
2082 uint id = scsi_device->id; 2082 uint id = scsi_device->id;
2083 uint lun = scsi_device->lun; 2083 uint lun = scsi_device->lun;
2084 2084
2085 pDCB = kmalloc(sizeof(struct dc390_dcb), GFP_KERNEL); 2085 pDCB = kzalloc(sizeof(struct dc390_dcb), GFP_KERNEL);
2086 if (!pDCB) 2086 if (!pDCB)
2087 return -ENOMEM; 2087 return -ENOMEM;
2088 memset(pDCB, 0, sizeof(struct dc390_dcb));
2089 2088
2090 if (!pACB->DCBCnt++) { 2089 if (!pACB->DCBCnt++) {
2091 pACB->pLinkDCB = pDCB; 2090 pACB->pLinkDCB = pDCB;