Searched hist:e97f9b5277afeabb54892ebc6f68500098467ba1 (Results 1 – 1 of 1) sorted by relevance
/openbmc/linux/drivers/gpio/ |
H A D | gpio-ich.c | diff e97f9b5277afeabb54892ebc6f68500098467ba1 Wed Feb 27 09:25:15 CST 2013 Mika Westerberg <mika.westerberg@linux.intel.com> gpio/gpio-ich: fix ichx_gpio_check_available() return what callers expect
ichx_gpio_check_available() returns either 0 or -ENXIO depending on whether the given GPIO is available or not. However, callers of this function treat the return value as boolean:
... if (!ichx_gpio_check_available(gpio, nr)) return -ENXIO;
which erroneusly fails when the GPIO is available and not vice versa.
Fix this by making the function return boolean as expected by the callers.
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
|