linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* re: scsi: mpt3sas: Handle firmware faults during second half of IOC init
@ 2021-06-01 11:41 Colin Ian King
  0 siblings, 0 replies; only message in thread
From: Colin Ian King @ 2021-06-01 11:41 UTC (permalink / raw)
  To: Suganath Prabu S, Sathya Prakash, Sreekanth Reddy
  Cc: Martin K. Petersen, James E.J. Bottomley, MPT-FusionLinux.pdl,
	linux-scsi, linux-kernel, kernel-janitors

Hi,

Static analysis with Coverity on linux-next has detected an issue in
drivers/scsi/mpt3sas/mpt3sas_base.c with the following commit:

commit a0815c45c89f544861eae55d85ccee6b1b1451e8
Author: Suganath Prabu S <suganath-prabu.subramani@broadcom.com>
Date:   Tue May 18 10:46:25 2021 +0530

    scsi: mpt3sas: Handle firmware faults during second half of IOC init

The analysis is as follows:

7208        if (ioc->port_enable_cmds.status & MPT3_CMD_COMPLETE_ASYNC) {
7209                if (ioc_status == MPI2_IOCSTATUS_SUCCESS) {
7210                        mpt3sas_port_enable_complete(ioc);
7211                        return 1;
7212                } else {
7213                        ioc->start_scan_failed = ioc_status;
7214                        ioc->start_scan = 0;
7215                        return 1;
7216                }

Structurally dead code (UNREACHABLE)
unreachable: This code cannot be reached:

7217                ioc->port_enable_cmds.status &=
~MPT3_CMD_COMPLETE_ASYNC;
7218        }

The return 1 statements in either parts of the proceeding if statement
end up with the ioc->port_enable_cmds.status masking assignment never
being reached.

Colin

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-06-01 11:41 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-01 11:41 scsi: mpt3sas: Handle firmware faults during second half of IOC init Colin Ian King

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).