]> git.baikalelectronics.ru Git - kernel.git/commit
gpio: potential null dereference
authorDan Carpenter <error27@gmail.com>
Tue, 27 Apr 2010 21:12:03 +0000 (14:12 -0700)
committerGrant Likely <grant.likely@secretlab.ca>
Wed, 28 Apr 2010 06:50:01 +0000 (00:50 -0600)
commitd3b0566aa47d23ae9ec1951a86b49ddd5de825a1
treea3f4236246c3ffd65d71571c1f41615c3f4e24fc
parente81baa679f43df02ace8c3263b53c767d714f2cd
gpio: potential null dereference

Smatch found a potential null dereference in gpio_setup_irq().  The
"pdesc" variable is allocated with idr_find() that can return NULL.  If
gpio_setup_irq() is called with 0 as gpio_flags and "pdesc" is null, it
would OOPs here.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Cc: David Brownell <david-b@pacbell.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
drivers/gpio/gpiolib.c