diff options
| author | Toomas Soome <tsoome@me.com> | 2019-12-30 22:35:01 +0200 |
|---|---|---|
| committer | Toomas Soome <tsoome@me.com> | 2020-03-04 08:24:32 +0200 |
| commit | bc576fff266b5ed3db0ef5d8196b7440cdefbb8b (patch) | |
| tree | b2a035f8145d66701abbb0597d5129e77b7eba17 | |
| parent | 45948e49c407e4fc264fdd289ed632d6639e009d (diff) | |
| download | illumos-joyent-bc576fff266b5ed3db0ef5d8196b7440cdefbb8b.tar.gz | |
12325 ahci: variable may be used uninitialized
Reviewed by: Matthias Scheler <mscheler@tintri.com>
Approved by: Dan McDonald <danmcd@joyent.com>
| -rw-r--r-- | usr/src/uts/common/io/sata/adapters/ahci/ahci.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/usr/src/uts/common/io/sata/adapters/ahci/ahci.c b/usr/src/uts/common/io/sata/adapters/ahci/ahci.c index 63edd9e0ce..691c03bff4 100644 --- a/usr/src/uts/common/io/sata/adapters/ahci/ahci.c +++ b/usr/src/uts/common/io/sata/adapters/ahci/ahci.c @@ -1432,6 +1432,7 @@ ahci_tran_probe_port(dev_info_t *dip, sata_device_t *sd) uint8_t port; int rval = SATA_SUCCESS, rval_init; + port_state = 0; ahci_ctlp = ddi_get_soft_state(ahci_statep, ddi_get_instance(dip)); port = ahci_ctlp->ahcictl_cport_to_port[cport]; @@ -1996,6 +1997,7 @@ ahci_claim_free_slot(ahci_ctl_t *ahci_ctlp, ahci_port_t *ahci_portp, ahci_portp->ahciport_pending_tags, ahci_portp->ahciport_pending_ncq_tags); + free_slots = 0; /* * According to the AHCI spec, system software is responsible to * ensure that queued and non-queued commands are not mixed in @@ -9837,6 +9839,8 @@ ahci_watchdog_handler(ahci_ctl_t *ahci_ctlp) AHCIDBG(AHCIDBG_ENTRY, ahci_ctlp, "ahci_watchdog_handler entered", NULL); + current_slot = 0; + current_tags = 0; for (port = 0; port < ahci_ctlp->ahcictl_num_ports; port++) { if (!AHCI_PORT_IMPLEMENTED(ahci_ctlp, port)) { continue; |
