lkml.org 
[lkml]   [2013]   [Aug]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: RFC: Bug in error handling in gpiolib.c
From
On Tue, Aug 27, 2013 at 9:17 PM, Tim Bird <tbird20d@gmail.com> wrote:

> Hi all,
>
> There appears to be a bug in the error handling in
> drivers/gpi/gpiolib.c In certain error cases
> desc_to_gpio() is called to get the gpio number
> for an error message, but this may happen on code
> paths where desc->chip is NULL. This causes a panic
> on my system in gpiod_request(), as follows:
(...)
> Here's my patch:
> Subject: [PATCH] gpio: avoid panic on NULL desc->chip in gpiod_request

Patch applied. Unless we come up with something better,
there is some parallel discussion on how to handle NULL
descriptors.

Alexandre: OK to apply this?

Yours,
Linus Walleij


\
 
 \ /
  Last update: 2013-08-29 20:22    [W:0.129 / U:0.928 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site