diff options
author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2010-08-02 18:33:26 -0700 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2010-08-02 18:34:07 -0700 |
commit | 0d87c7228a49e8342d60dd552892e470e0b291fa (patch) | |
tree | 1282bcec7d8360d9f49b122fd3dca73f2787f47c /drivers/input/joystick | |
parent | 60347c194acec7ff1b4291ac8e62a5345244c2ee (diff) | |
download | linux-stable-0d87c7228a49e8342d60dd552892e470e0b291fa.tar.gz linux-stable-0d87c7228a49e8342d60dd552892e470e0b291fa.tar.bz2 linux-stable-0d87c7228a49e8342d60dd552892e470e0b291fa.zip |
Input: adp5588-keypad - fix NULL dereference in adp5588_gpio_add()
The kpad structure is assigned to i2c client via i2s_set_clientdata()
at the end of adp5588_probe(), but in adp5588_gpio_add() we tried to
access it (via dev_get_drvdata! which is not nice at all) causing an
oops.
Let's pass pointer to kpad directly into adp5588_gpio_add() and
adp5588_gpio_remove() to avoid accessing driver data before it is
set up.
Also split out building of gpiomap into a separate function to
clear the logic.
Reported-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers/input/joystick')
0 files changed, 0 insertions, 0 deletions