svn commit: r293872 - head/sys/dev/gpio
Adrian Chadd
adrian at FreeBSD.org
Thu Jan 14 02:58:30 UTC 2016
Author: adrian
Date: Thu Jan 14 02:58:28 2016
New Revision: 293872
URL: https://svnweb.freebsd.org/changeset/base/293872
Log:
[gpiobus] handle the case of there being a single GPIO pin available.
PR: kern/206035
Submitted by: Stanislav Galabov <sgalabov at gmail.com>
Modified:
head/sys/dev/gpio/gpiobus.c
Modified: head/sys/dev/gpio/gpiobus.c
==============================================================================
--- head/sys/dev/gpio/gpiobus.c Thu Jan 14 02:55:28 2016 (r293871)
+++ head/sys/dev/gpio/gpiobus.c Thu Jan 14 02:58:28 2016 (r293872)
@@ -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++;
More information about the svn-src-all
mailing list