]> git.baikalelectronics.ru Git - kernel.git/commit
Input: pxa27x_keypad - fix NULL pointer dereference
authorMike Dunn <mikedunn@newsguy.com>
Wed, 18 Sep 2013 15:07:41 +0000 (08:07 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Wed, 18 Sep 2013 15:13:54 +0000 (08:13 -0700)
commitca6b748c406d5aac25438885ad2586e82e6d21e3
tree36bd86a961050c0fdc433a1520a13d94ca1e5aa6
parenta459da2e4e9a51ff4a07b814cd93c3a0d1064dce
Input: pxa27x_keypad - fix NULL pointer dereference

A NULL pointer dereference exception occurs in the driver probe function when
device tree is used.  The pdata pointer will be NULL in this case, but the code
dereferences it in all cases.  When device tree is used, a platform data
structure is allocated and initialized, and in all cases this pointer is copied
to the driver's private data, so the variable being tested should be accessed
through the driver's private data structure.

Signed-off-by: Mike Dunn <mikedunn@newsguy.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/keyboard/pxa27x_keypad.c