aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-08-01 23:48:42 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-08-01 23:48:42 -0400
commit878701db07db3f0b59f14f0c525b681e4ca81551 (patch)
tree132083fef920c0df6e41379909d3f071f2d68032 /drivers/scsi
parent04668873daa822aa6c806ba28d1143db8dcb26e8 (diff)
parent3fcece66911c9d485c1e2050ba033fde607b5130 (diff)
Merge master.kernel.org:/pub/scm/linux/kernel/git/bart/ide-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/bart/ide-2.6: scc_pata: PIO fixes piix/slc90e66: fix PIO1 handling in ->speedproc method (take 2) jmicron: PIO fixes it8213: PIO fixes (take 2) cs5535: PIO fixes cs5520: fix PIO auto-tuning in ->ide_dma_check method drivers/scsi/ide-scsi.c: kmalloc + memset conversion to kzalloc drivers/ide/arm/icside.c: kmalloc + memset conversion to kzalloc ide: eliminate warnings in ide-tape.c ide: fix runtogether printk's in cmd64x IDE driver sis5513: Add FSC Amilo A1630 PCI subvendor/dev to laptops alim15x3: Correct HP detect ide: Fix an overrun found in the CS5535 IDE driver
Diffstat (limited to 'drivers/scsi')
-rw-r--r--drivers/scsi/ide-scsi.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/scsi/ide-scsi.c b/drivers/scsi/ide-scsi.c
index bb90df8bdce4..1cc01acc2808 100644
--- a/drivers/scsi/ide-scsi.c
+++ b/drivers/scsi/ide-scsi.c
@@ -328,17 +328,15 @@ static int idescsi_check_condition(ide_drive_t *drive, struct request *failed_co
328 u8 *buf; 328 u8 *buf;
329 329
330 /* stuff a sense request in front of our current request */ 330 /* stuff a sense request in front of our current request */
331 pc = kmalloc (sizeof (idescsi_pc_t), GFP_ATOMIC); 331 pc = kzalloc(sizeof(idescsi_pc_t), GFP_ATOMIC);
332 rq = kmalloc (sizeof (struct request), GFP_ATOMIC); 332 rq = kmalloc(sizeof(struct request), GFP_ATOMIC);
333 buf = kmalloc(SCSI_SENSE_BUFFERSIZE, GFP_ATOMIC); 333 buf = kzalloc(SCSI_SENSE_BUFFERSIZE, GFP_ATOMIC);
334 if (pc == NULL || rq == NULL || buf == NULL) { 334 if (!pc || !rq || !buf) {
335 kfree(buf); 335 kfree(buf);
336 kfree(rq); 336 kfree(rq);
337 kfree(pc); 337 kfree(pc);
338 return -ENOMEM; 338 return -ENOMEM;
339 } 339 }
340 memset (pc, 0, sizeof (idescsi_pc_t));
341 memset (buf, 0, SCSI_SENSE_BUFFERSIZE);
342 ide_init_drive_cmd(rq); 340 ide_init_drive_cmd(rq);
343 rq->special = (char *) pc; 341 rq->special = (char *) pc;
344 pc->rq = rq; 342 pc->rq = rq;