diff options
author | Wei Yongjun <yongjun_wei@trendmicro.com.cn> | 2013-02-27 20:05:46 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-02-27 22:10:23 -0500 |
commit | 940da353a83e895ea600cb8ab17dceefb1bcb469 (patch) | |
tree | 233e9a0879f7c5b193ceb5dd32b92162c7ea8866 /drivers/memstick/host | |
parent | 507063b2a435b24951bce8e1f67ab65cda490f1b (diff) |
memstick: move the dereference below the NULL test
The dereference should be moved below the NULL test.
spatch with a semantic match is used to found this.
(http://coccinelle.lip6.fr/)
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Cc: Maxim Levitsky <maximlevitsky@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/memstick/host')
-rw-r--r-- | drivers/memstick/host/r592.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/memstick/host/r592.c b/drivers/memstick/host/r592.c index 29b2172ae18f..a7c5b31c0d50 100644 --- a/drivers/memstick/host/r592.c +++ b/drivers/memstick/host/r592.c | |||
@@ -454,7 +454,7 @@ static int r592_transfer_fifo_pio(struct r592_device *dev) | |||
454 | /* Executes one TPC (data is read/written from small or large fifo) */ | 454 | /* Executes one TPC (data is read/written from small or large fifo) */ |
455 | static void r592_execute_tpc(struct r592_device *dev) | 455 | static void r592_execute_tpc(struct r592_device *dev) |
456 | { | 456 | { |
457 | bool is_write = dev->req->tpc >= MS_TPC_SET_RW_REG_ADRS; | 457 | bool is_write; |
458 | int len, error; | 458 | int len, error; |
459 | u32 status, reg; | 459 | u32 status, reg; |
460 | 460 | ||
@@ -463,6 +463,7 @@ static void r592_execute_tpc(struct r592_device *dev) | |||
463 | return; | 463 | return; |
464 | } | 464 | } |
465 | 465 | ||
466 | is_write = dev->req->tpc >= MS_TPC_SET_RW_REG_ADRS; | ||
466 | len = dev->req->long_data ? | 467 | len = dev->req->long_data ? |
467 | dev->req->sg.length : dev->req->data_len; | 468 | dev->req->sg.length : dev->req->data_len; |
468 | 469 | ||