aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/ide-scsi.c
diff options
context:
space:
mode:
authorJesper Juhl <jesper.juhl@gmail.com>2005-11-07 04:01:26 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2005-11-07 10:54:01 -0500
commitc9475cb0c358ff0dd473544280d92482df491913 (patch)
tree091617d0bdab9273d44139c86af21b7540e6d9b1 /drivers/scsi/ide-scsi.c
parent089b1dbbde28f0f641c20beabba28fa89ab4fab9 (diff)
[PATCH] kfree cleanup: drivers/scsi
This is the drivers/scsi/ part of the big kfree cleanup patch. Remove pointless checks for NULL prior to calling kfree() in drivers/scsi/. Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com> Cc: James Bottomley <James.Bottomley@steeleye.com> Acked-by: Kai Makisara <kai.makisara@kolumbus.fi> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/scsi/ide-scsi.c')
-rw-r--r--drivers/scsi/ide-scsi.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/scsi/ide-scsi.c b/drivers/scsi/ide-scsi.c
index f04f3289938d..c888af4a4562 100644
--- a/drivers/scsi/ide-scsi.c
+++ b/drivers/scsi/ide-scsi.c
@@ -331,9 +331,9 @@ static int idescsi_check_condition(ide_drive_t *drive, struct request *failed_co
331 rq = kmalloc (sizeof (struct request), GFP_ATOMIC); 331 rq = kmalloc (sizeof (struct request), GFP_ATOMIC);
332 buf = kmalloc(SCSI_SENSE_BUFFERSIZE, GFP_ATOMIC); 332 buf = kmalloc(SCSI_SENSE_BUFFERSIZE, GFP_ATOMIC);
333 if (pc == NULL || rq == NULL || buf == NULL) { 333 if (pc == NULL || rq == NULL || buf == NULL) {
334 if (pc) kfree(pc); 334 kfree(buf);
335 if (rq) kfree(rq); 335 kfree(rq);
336 if (buf) kfree(buf); 336 kfree(pc);
337 return -ENOMEM; 337 return -ENOMEM;
338 } 338 }
339 memset (pc, 0, sizeof (idescsi_pc_t)); 339 memset (pc, 0, sizeof (idescsi_pc_t));
@@ -949,8 +949,8 @@ static int idescsi_queue (struct scsi_cmnd *cmd,
949 spin_lock_irq(host->host_lock); 949 spin_lock_irq(host->host_lock);
950 return 0; 950 return 0;
951abort: 951abort:
952 if (pc) kfree (pc); 952 kfree (pc);
953 if (rq) kfree (rq); 953 kfree (rq);
954 cmd->result = DID_ERROR << 16; 954 cmd->result = DID_ERROR << 16;
955 done(cmd); 955 done(cmd);
956 return 0; 956 return 0;