diff options
author | Wei Yongjun <yongjun_wei@trendmicro.com.cn> | 2012-09-07 08:55:32 +0200 |
---|---|---|
committer | Nicholas Bellinger <nab@linux-iscsi.org> | 2012-09-18 03:04:09 +0200 |
commit | 7875f179085608c659b676be74d33a2e515d8f43 (patch) | |
tree | 163cadd0a5f103a0adcc6d1dcdc13658a0c8480e | |
parent | target: go through normal processing for all zero-length commands (diff) | |
download | linux-7875f179085608c659b676be74d33a2e515d8f43.tar.xz linux-7875f179085608c659b676be74d33a2e515d8f43.zip |
tcm_fc: 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>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
-rw-r--r-- | drivers/target/tcm_fc/tfc_io.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/target/tcm_fc/tfc_io.c b/drivers/target/tcm_fc/tfc_io.c index d051102679a4..b6fd4cf42840 100644 --- a/drivers/target/tcm_fc/tfc_io.c +++ b/drivers/target/tcm_fc/tfc_io.c @@ -327,11 +327,12 @@ drop: */ void ft_invl_hw_context(struct ft_cmd *cmd) { - struct fc_seq *seq = cmd->seq; + struct fc_seq *seq; struct fc_exch *ep = NULL; struct fc_lport *lport = NULL; BUG_ON(!cmd); + seq = cmd->seq; /* Cleanup the DDP context in HW if DDP was setup */ if (cmd->was_ddp_setup && seq) { |