summaryrefslogtreecommitdiffstats
path: root/drivers/gpio/gpio-mxc.c
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@linaro.org>2013-08-30 09:41:45 +0200
committerLinus Walleij <linus.walleij@linaro.org>2013-09-03 14:08:28 +0200
commitbe1a4b13089b1e18da83a549d49163ccad3c19ba (patch)
tree321f0e432ef3df8f7ea17a664087e58d3f24a7c6 /drivers/gpio/gpio-mxc.c
parent6c17aa0138a6c55364936bbaa35846e09a4db53b (diff)
downloadblackbird-obmc-linux-be1a4b13089b1e18da83a549d49163ccad3c19ba.tar.gz
blackbird-obmc-linux-be1a4b13089b1e18da83a549d49163ccad3c19ba.zip
gpio: improve error path in gpiolib
At several places the gpiolib will proceed to handle a GPIO descriptor even if it's ->chip member is NULL and no gpiochip is associated. Fix this by checking that both the descriptor cookie *and* the chip pointer are valid. Also bail out earlier with more specific diagnostic messages on missing operations for setting as input/output or debounce. ChangeLog v1->v2: - Also return -EIO on gpiod_set_debounce() with missing operations in the vtable - Fix indentations. Suggested-by: Alexandre Courbot <acourbot@nvidia.com> Acked-by: Alexandre Courbot <acourbot@nvidia.com> Reviewed-by: Frank Rowand <frank.rowand@sonymobile.com> Cc: Tim Bird <tim.bird@sonymobile.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/gpio/gpio-mxc.c')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud