diff options
author | Julia Lawall <julia@diku.dk> | 2010-08-11 03:01:13 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-08-11 17:59:00 +0200 |
commit | 95cc7baa7f19e191b4790d144b7cbe47369cfe32 (patch) | |
tree | 90197ae42d5b9ba0213e13684e64a04650735e34 /drivers/message/i2o/i2o_scsi.c | |
parent | NCR5380: bit MR_DMA_MODE set twice in NCR5380_transfer_dma() (diff) | |
download | linux-95cc7baa7f19e191b4790d144b7cbe47369cfe32.tar.xz linux-95cc7baa7f19e191b4790d144b7cbe47369cfe32.zip |
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/message/i2o/i2o_scsi.c')
0 files changed, 0 insertions, 0 deletions