diff options
author | Hillf Danton <dhillf@gmail.com> | 2011-01-28 19:03:26 -0500 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2011-02-12 11:57:22 -0500 |
commit | 28a4af1e43047531ab612564e32ab9969c9dd965 (patch) | |
tree | 2c91320742f7d6110d034b7627684f4090724d3b /drivers/scsi/libfc | |
parent | fa79dbdbdd166025b5835bddaff152bb57c4440a (diff) |
[SCSI] libfc: Cleanup return paths in fc_rport_error_retry
This patch makes it so that we only have one call to
fc_rport_error. This patch does not completely
consolidate return statements, there is still one return
used when not calling fc_rport_error, but alternative
solutions made the code more confusing.
[ Patch modified by Robert Love ]
[ Patch title and commit message edited by Robert Love
to make it more relevant ]
Signed-off-by: Hillf Danton <dhillf@gmail.com>
Signed-off-by: Robert Love <robert.w.love@intel.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi/libfc')
-rw-r--r-- | drivers/scsi/libfc/fc_rport.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/scsi/libfc/fc_rport.c b/drivers/scsi/libfc/fc_rport.c index a7175adab32d..325bc429dda4 100644 --- a/drivers/scsi/libfc/fc_rport.c +++ b/drivers/scsi/libfc/fc_rport.c | |||
@@ -575,7 +575,7 @@ static void fc_rport_error_retry(struct fc_rport_priv *rdata, | |||
575 | 575 | ||
576 | /* make sure this isn't an FC_EX_CLOSED error, never retry those */ | 576 | /* make sure this isn't an FC_EX_CLOSED error, never retry those */ |
577 | if (PTR_ERR(fp) == -FC_EX_CLOSED) | 577 | if (PTR_ERR(fp) == -FC_EX_CLOSED) |
578 | return fc_rport_error(rdata, fp); | 578 | goto out; |
579 | 579 | ||
580 | if (rdata->retries < rdata->local_port->max_rport_retry_count) { | 580 | if (rdata->retries < rdata->local_port->max_rport_retry_count) { |
581 | FC_RPORT_DBG(rdata, "Error %ld in state %s, retrying\n", | 581 | FC_RPORT_DBG(rdata, "Error %ld in state %s, retrying\n", |
@@ -588,7 +588,8 @@ static void fc_rport_error_retry(struct fc_rport_priv *rdata, | |||
588 | return; | 588 | return; |
589 | } | 589 | } |
590 | 590 | ||
591 | return fc_rport_error(rdata, fp); | 591 | out: |
592 | fc_rport_error(rdata, fp); | ||
592 | } | 593 | } |
593 | 594 | ||
594 | /** | 595 | /** |