Re: [bug report] scsi: message: fusion: Open-code mptfc_block_error_handler() for bus reset

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

 



On 10/17/23 15:18, Dan Carpenter wrote:
Hello Hannes Reinecke,

The patch 17865dc2eccc: "scsi: message: fusion: Open-code
mptfc_block_error_handler() for bus reset" from Oct 2, 2023
(linux-next), leads to the following Smatch static checker warning:

	drivers/message/fusion/mptfc.c:281 mptfc_bus_reset()
	error: uninitialized symbol 'rtn'.

drivers/message/fusion/mptfc.c
     261 static int
     262 mptfc_bus_reset(struct scsi_cmnd *SCpnt)
     263 {
     264         struct Scsi_Host *shost = SCpnt->device->host;
     265         MPT_SCSI_HOST __maybe_unused *hd = shost_priv(shost);
     266         int channel = SCpnt->device->channel;
     267         struct mptfc_rport_info *ri;
     268         int rtn;
     269
     270         list_for_each_entry(ri, &hd->ioc->fc_rports, list) {
     271                 if (ri->flags & MPT_RPORT_INFO_FLAGS_REGISTERED) {
     272                         VirtTarget *vtarget = ri->starget->hostdata;
     273
     274                         if (!vtarget || vtarget->channel != channel)
     275                                 continue;
     276                         rtn = fc_block_rport(ri->rport);

Are we always going to hit this assignment?

I _think_, but it'll be good to initialize anyway.
Thanks for the report.

Cheers,

Hannes




[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