Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 16 May 2022 13:21:24 GMT
From:      Emmanuel Vadot <manu@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: cb26df12c116 - stable/13 - arm: allwinner: aw_gpio: Plug set but not used variable
Message-ID:  <202205161321.24GDLOFg043104@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by manu:

URL: https://cgit.FreeBSD.org/src/commit/?id=cb26df12c1167b2b05641a571a9c7cac427e7f4b

commit cb26df12c1167b2b05641a571a9c7cac427e7f4b
Author:     Emmanuel Vadot <manu@FreeBSD.org>
AuthorDate: 2022-02-21 09:53:58 +0000
Commit:     Emmanuel Vadot <manu@FreeBSD.org>
CommitDate: 2022-05-16 13:15:43 +0000

    arm: allwinner: aw_gpio: Plug set but not used variable
    
    Sponsored by:   Beckhoff Automation GmbH & Co. KG
    
    (cherry picked from commit 3dc60bab2750cdab9963c179786cd7d4f1931303)
---
 sys/arm/allwinner/aw_gpio.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/sys/arm/allwinner/aw_gpio.c b/sys/arm/allwinner/aw_gpio.c
index c6be70aec493..1221384fb875 100644
--- a/sys/arm/allwinner/aw_gpio.c
+++ b/sys/arm/allwinner/aw_gpio.c
@@ -820,14 +820,13 @@ aw_gpio_pin_config_32(device_t dev, uint32_t first_pin, uint32_t num_pins,
     uint32_t *pin_flags)
 {
 	struct aw_gpio_softc *sc;
-	uint32_t bank, pin;
+	uint32_t pin;
 	int err;
 
 	sc = device_get_softc(dev);
 	if (first_pin > sc->conf->padconf->npins)
 		return (EINVAL);
 
-	bank = sc->conf->padconf->pins[first_pin].port;
 	if (sc->conf->padconf->pins[first_pin].pin != 0)
 		return (EINVAL);
 
@@ -1309,20 +1308,21 @@ aw_gpio_pic_setup_intr(device_t dev, struct intr_irqsrc *isrc,
     struct resource *res, struct intr_map_data *data)
 {
 	struct aw_gpio_softc *sc;
-	struct gpio_irqsrc *gi;
 	uint32_t irqcfg;
 	uint32_t pinidx, reg;
 	u_int irq, mode;
 	int err;
 
 	sc = device_get_softc(dev);
-	gi = (struct gpio_irqsrc *)isrc;
 
+	err = 0;
 	switch (data->type) {
 	case INTR_MAP_DATA_GPIO:
 		err = aw_gpio_pic_map_gpio(sc,
 		    (struct intr_map_data_gpio *)data,
 		  &irq, &mode);
+		if (err != 0)
+			return (err);
 		break;
 	default:
 		return (ENOTSUP);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202205161321.24GDLOFg043104>