On Fri, 15 Feb 2013 14:46:14 +0900, Alexandre Courbot
wrote:
> 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 a
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:
On Thu, Feb 14, 2013 at 7:49 AM, Ryan Mallon wrote:
> Is it really useful to use the same pr_debug for the error case? Why not do:
>
> desc = gpio_to_desc(gpio);
> if (!desc) {
> pr_debug("%s - Invalid gpio %d\n", __func__, gpio);
> return -EINVAL;
>
On 13/02/13 18:02, Alexandre Courbot wrote:
> From: Alexandre Courbot
>
> 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 w
From: Alexandre Courbot
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 oopsing.
5 matches
Mail list logo