git: 29e0af110aa2 - stable/13 - iwm: Fix -Wunused-but-set-variable warnings
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 07 Mar 2022 13:29:48 UTC
The branch stable/13 has been updated by markj:
URL: https://cgit.FreeBSD.org/src/commit/?id=29e0af110aa2907cf95f7f97d288899d95a402bc
commit 29e0af110aa2907cf95f7f97d288899d95a402bc
Author: Mark Johnston <markj@FreeBSD.org>
AuthorDate: 2022-02-28 15:54:15 +0000
Commit: Mark Johnston <markj@FreeBSD.org>
CommitDate: 2022-03-07 13:17:47 +0000
iwm: Fix -Wunused-but-set-variable warnings
(cherry picked from commit 1dc8ed06f37a0d5ff4b78791885d7ba6dd3e407b)
---
sys/dev/iwm/if_iwm.c | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/sys/dev/iwm/if_iwm.c b/sys/dev/iwm/if_iwm.c
index f994e8e75307..7310927904cc 100644
--- a/sys/dev/iwm/if_iwm.c
+++ b/sys/dev/iwm/if_iwm.c
@@ -5719,7 +5719,7 @@ iwm_intr(void *arg)
{
struct iwm_softc *sc = arg;
int handled = 0;
- int r1, r2, rv = 0;
+ int r1, r2;
int isperiodic = 0;
IWM_LOCK(sc);
@@ -5811,7 +5811,6 @@ iwm_intr(void *arg)
handled |= IWM_CSR_INT_BIT_HW_ERR;
device_printf(sc->sc_dev, "hardware error, stopping device\n");
iwm_stop(sc);
- rv = 1;
goto out;
}
@@ -5856,8 +5855,6 @@ iwm_intr(void *arg)
if (__predict_false(r1 & ~handled))
IWM_DPRINTF(sc, IWM_DEBUG_INTR,
"%s: unhandled interrupts: %x\n", __func__, r1);
- rv = 1;
-
out_ena:
iwm_restore_interrupts(sc);
out:
@@ -5992,9 +5989,9 @@ iwm_pci_attach(device_t dev)
}
error = bus_setup_intr(dev, sc->sc_irq, INTR_TYPE_NET | INTR_MPSAFE,
NULL, iwm_intr, sc, &sc->sc_ih);
- if (sc->sc_ih == NULL) {
+ if (error != 0) {
device_printf(dev, "can't establish interrupt");
- return (ENXIO);
+ return (error);
}
sc->sc_dmat = bus_get_dma_tag(sc->sc_dev);