aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJulia Lawall <julia@diku.dk>2010-09-29 04:31:29 -0400
committerGrant Likely <grant.likely@secretlab.ca>2010-09-29 04:31:29 -0400
commite447d3588e1c5944f607083cb509663f8015d420 (patch)
tree66e90d9ec1e6579f8e014384664791dfeb2d6cca
parent079a176d87a4da4cb18864c54d3932131e11e229 (diff)
spi/orion: Drop unnecessary null test
list_for_each_entry binds its first argument to a non-null value, and thus any null test on the value of that argument is superfluous. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ iterator I; expression x,E; @@ I(x,...) { <... - (x != NULL) && E ...> } // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
-rw-r--r--drivers/spi/orion_spi.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/spi/orion_spi.c b/drivers/spi/orion_spi.c
index 3aea50da7b29..0b677dc041ad 100644
--- a/drivers/spi/orion_spi.c
+++ b/drivers/spi/orion_spi.c
@@ -404,7 +404,7 @@ static int orion_spi_transfer(struct spi_device *spi, struct spi_message *m)
404 goto msg_rejected; 404 goto msg_rejected;
405 } 405 }
406 406
407 if ((t != NULL) && t->bits_per_word) 407 if (t->bits_per_word)
408 bits_per_word = t->bits_per_word; 408 bits_per_word = t->bits_per_word;
409 409
410 if ((bits_per_word != 8) && (bits_per_word != 16)) { 410 if ((bits_per_word != 8) && (bits_per_word != 16)) {
@@ -415,7 +415,7 @@ static int orion_spi_transfer(struct spi_device *spi, struct spi_message *m)
415 goto msg_rejected; 415 goto msg_rejected;
416 } 416 }
417 /*make sure buffer length is even when working in 16 bit mode*/ 417 /*make sure buffer length is even when working in 16 bit mode*/
418 if ((t != NULL) && (t->bits_per_word == 16) && (t->len & 1)) { 418 if ((t->bits_per_word == 16) && (t->len & 1)) {
419 dev_err(&spi->dev, 419 dev_err(&spi->dev,
420 "message rejected : " 420 "message rejected : "
421 "odd data length (%d) while in 16 bit mode\n", 421 "odd data length (%d) while in 16 bit mode\n",