diff mbox series

[1/3] scsi: fnic: Remove unnecessary else and unnecessary break in FDLS

Message ID 20250106224451.3597-1-kartilak@cisco.com
State New
Headers show
Series [1/3] scsi: fnic: Remove unnecessary else and unnecessary break in FDLS | expand

Commit Message

Karan Tilak Kumar Jan. 6, 2025, 10:44 p.m. UTC
Incorporate review comments from Martin:
    Remove unnecessary else and unnecessary break to fix warnings
    in the FDLS code.

Reviewed-by: Sesidhar Baddela <sebaddel@cisco.com>
Reviewed-by: Arulprabhu Ponnusamy <arulponn@cisco.com>
Reviewed-by: Gian Carlo Boffa <gcboffa@cisco.com>
Reviewed-by: Arun Easi <aeasi@cisco.com>
Signed-off-by: Karan Tilak Kumar <kartilak@cisco.com>
---
 drivers/scsi/fnic/fdls_disc.c | 16 ++++++----------
 1 file changed, 6 insertions(+), 10 deletions(-)
diff mbox series

Patch

diff --git a/drivers/scsi/fnic/fdls_disc.c b/drivers/scsi/fnic/fdls_disc.c
index 2534af2fff53..2513a82a8915 100644
--- a/drivers/scsi/fnic/fdls_disc.c
+++ b/drivers/scsi/fnic/fdls_disc.c
@@ -2776,23 +2776,19 @@  fdls_process_tgt_prli_rsp(struct fnic_iport_s *iport,
 			/*Retry Plogi again from the timer routine. */
 			tport->flags |= FNIC_FDLS_RETRY_FRAME;
 			return;
-		} else {
-			FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
-						 "PRLI returned ELS_LS_RJT from target: 0x%x",
-						 tgt_fcid);
-
-			fdls_tgt_logout(iport, tport);
-			fdls_delete_tport(iport, tport);
-			return;
 		}
-		break;
+		FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
+					 "PRLI returned ELS_LS_RJT from target: 0x%x",
+					 tgt_fcid);
 
+		fdls_tgt_logout(iport, tport);
+		fdls_delete_tport(iport, tport);
+		return;
 	default:
 		atomic64_inc(&iport->iport_stats.tport_prli_misc_rejects);
 		FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
 					 "PRLI not accepted from target: 0x%x", tgt_fcid);
 		return;
-		break;
 	}
 
 	FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,