From: Alexandre Courbot Date: Fri, 15 Feb 2013 05:46:14 +0000 (+0900) Subject: gpiolib: check descriptors validity before use X-Git-Tag: v3.9-rc2~27^2~3 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bcabdef12da49878789464ad7239e97d83ea5ef5;p=pandora-kernel.git 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 Cc: Ryan Mallon Signed-off-by: Grant Likely --- Reading git-diff-tree failed