We need to check for a valid io_req before we check other data. Also,
remove redundant checks.
Link: https://lore.kernel.org/r/20201121023337.19295-1-kartilak@cisco.com
Reviewed-by: Arulprabhu Ponnusamy <arulponn@cisco.com>
Co-developed-by: Satish Kharat <satishkh@cisco.com>
Signed-off-by: Satish Kharat <satishkh@cisco.com>
Signed-off-by: Karan Tilak Kumar <kartilak@cisco.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
#define DRV_NAME "fnic"
#define DRV_DESCRIPTION "Cisco FCoE HBA Driver"
-#define DRV_VERSION "1.6.0.52"
+#define DRV_VERSION "1.6.0.53"
#define PFX DRV_NAME ": "
#define DFX DRV_NAME "%d: "
continue;
}
- cmd_rport = starget_to_rport(scsi_target(sc->device));
- if (rport != cmd_rport) {
+ io_req = (struct fnic_io_req *)CMD_SP(sc);
+ if (!io_req) {
spin_unlock_irqrestore(io_lock, flags);
continue;
}
- io_req = (struct fnic_io_req *)CMD_SP(sc);
-
- if (!io_req || rport != cmd_rport) {
+ cmd_rport = starget_to_rport(scsi_target(sc->device));
+ if (rport != cmd_rport) {
spin_unlock_irqrestore(io_lock, flags);
continue;
}