aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/initio.c
diff options
context:
space:
mode:
authorJulia Lawall <julia@diku.dk>2010-08-10 21:01:13 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2010-08-11 11:59:00 -0400
commit95cc7baa7f19e191b4790d144b7cbe47369cfe32 (patch)
tree90197ae42d5b9ba0213e13684e64a04650735e34 /drivers/scsi/initio.c
parent085267acd0ca29623c8239a38639d43d6d21e972 (diff)
drivers/scsi: remove unnecessary NULL test
At the point where cmnd is initialized, it is tested for NULL, so it doesn't have to be tested again here. A simplified version of the semantic match that detects this problem is as follows (http://coccinelle.lip6.fr/): // <smpl> @match exists@ expression x, E; identifier fld; @@ * x->fld ... when != \(x = E\|&x\) * x == NULL // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Cc: James Bottomley <James.Bottomley@HansenPartnership.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/scsi/initio.c')
-rw-r--r--drivers/scsi/initio.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/scsi/initio.c b/drivers/scsi/initio.c
index a7714160fbc3..108797761b95 100644
--- a/drivers/scsi/initio.c
+++ b/drivers/scsi/initio.c
@@ -2817,7 +2817,6 @@ static void i91uSCBPost(u8 * host_mem, u8 * cblk_mem)
2817 } 2817 }
2818 2818
2819 cmnd->result = cblk->tastat | (cblk->hastat << 16); 2819 cmnd->result = cblk->tastat | (cblk->hastat << 16);
2820 WARN_ON(cmnd == NULL);
2821 i91u_unmap_scb(host->pci_dev, cmnd); 2820 i91u_unmap_scb(host->pci_dev, cmnd);
2822 cmnd->scsi_done(cmnd); /* Notify system DONE */ 2821 cmnd->scsi_done(cmnd); /* Notify system DONE */
2823 initio_release_scb(host, cblk); /* Release SCB for current channel */ 2822 initio_release_scb(host, cblk); /* Release SCB for current channel */