The branch main has been updated by manu:

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

commit 3dc60bab2750cdab9963c179786cd7d4f1931303
Author:     Emmanuel Vadot <[email protected]>
AuthorDate: 2022-02-21 09:53:58 +0000
Commit:     Emmanuel Vadot <[email protected]>
CommitDate: 2022-02-21 10:08:05 +0000

    arm: allwinner: aw_gpio: Plug set but not used variable
    
    Sponsored by:   Beckhoff Automation GmbH & Co. KG
---
 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);

Reply via email to