mirror of
https://github.com/opnsense/src.git
synced 2026-06-09 00:32:25 -04:00
gpiopower: Fix call to ofw_gpiobus_parse_gpios
Failure is denoted by -1, not non-zero. A positive integer denotes the number of pins mapped and configured.
This commit is contained in:
parent
00a80538b4
commit
de6353ad8f
1 changed files with 1 additions and 1 deletions
|
|
@ -74,7 +74,7 @@ gpiopower_attach(device_t dev)
|
|||
if ((node = ofw_bus_get_node(dev)) == -1)
|
||||
return (ENXIO);
|
||||
|
||||
if (ofw_gpiobus_parse_gpios(dev, "gpios", &sc->sc_pin) != 0) {
|
||||
if (ofw_gpiobus_parse_gpios(dev, "gpios", &sc->sc_pin) <= 0) {
|
||||
device_printf(dev, "failed to map GPIO pin\n");
|
||||
return (ENXIO);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue