[PATCH] scsi: fnic: drop unnecessary NULL check in is_fnic_fip_flogi_reject()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



    if (desc->fip_dtype == FIP_DT_FLOGI) {
        ...
        els = (struct fip_encaps *)desc;
        fh = (struct fc_frame_header *)(els + 1);

'fh' can't be NULL here after shifting a valid pointer 'desc'.

Detected using the static analysis tool - Svace.
Signed-off-by: Alexey Kodanev <aleksei.kodanev@xxxxxxxxxxx>
---
 drivers/scsi/fnic/fnic_fcs.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/scsi/fnic/fnic_fcs.c b/drivers/scsi/fnic/fnic_fcs.c
index 79ddfaaf71a4..acf593467012 100644
--- a/drivers/scsi/fnic/fnic_fcs.c
+++ b/drivers/scsi/fnic/fnic_fcs.c
@@ -337,9 +337,6 @@ static inline int is_fnic_fip_flogi_reject(struct fcoe_ctlr *fip,
 		els = (struct fip_encaps *)desc;
 		fh = (struct fc_frame_header *)(els + 1);
 
-		if (!fh)
-			return 0;
-
 		/*
 		 * ELS command code, reason and explanation should be = Reject,
 		 * unsupported command and insufficient resource
-- 
2.25.1




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux