commit | bcabdef12da49878789464ad7239e97d83ea5ef5 | [log] [tgz] |
---|---|---|
author | Alexandre Courbot <acourbot@nvidia.com> | Fri Feb 15 14:46:14 2013 +0900 |
committer | Grant Likely <grant.likely@secretlab.ca> | Sat Mar 02 13:20:19 2013 +0000 |
tree | 9ecc37897f165bdd812551f4696cd3ed7f78de65 | |
parent | b0af9cd9aab60ceb17d3ebabb9fdf4ff0a99cf50 [diff] |
gpiolib: check descriptors validity before use Some functions dereferenced their GPIO descriptor argument without checking its validity first, potentially leading to an oops when given an invalid argument. This patch also makes gpio_get_value() more resilient when given an invalid GPIO, returning 0 instead of silently crashing. Signed-off-by: Alexandre Courbot <acourbot@nvidia.com> Cc: Ryan Mallon <rmallon@gmail.com> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>