[gpiobus] handle the case of there being a single GPIO pin available.
PR: kern/206035 Submitted by: Stanislav Galabov <sgalabov@gmail.com>
This commit is contained in:
parent
358d08b83b
commit
82104eda6a
@ -184,7 +184,7 @@ gpiobus_init_softc(device_t dev)
|
||||
if (GPIO_PIN_MAX(sc->sc_dev, &sc->sc_npins) != 0)
|
||||
return (ENXIO);
|
||||
|
||||
KASSERT(sc->sc_npins != 0, ("GPIO device with no pins"));
|
||||
KASSERT(sc->sc_npins >= 0, ("GPIO device with no pins"));
|
||||
|
||||
/* Pins = GPIO_PIN_MAX() + 1 */
|
||||
sc->sc_npins++;
|
||||
|
Loading…
x
Reference in New Issue
Block a user