aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input
diff options
context:
space:
mode:
authorShubhrajyoti D <a0393217@india.ti.com>2011-04-06 18:31:22 -0400
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2011-04-06 18:32:10 -0400
commit8f74c0661c42104b3e3d2c032bc61efde15360ad (patch)
treee11f7384eb3191e338bc56d5edd220f8dad24802 /drivers/input
parente28e1d93e9591d21e440f5210a9b4317c59445df (diff)
Input: twl4030_keypad - avoid potential NULL-pointer dereference
Signed-off-by: Shubhrajyoti D <a0393217@india.ti.com> Acked-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers/input')
-rw-r--r--drivers/input/keyboard/twl4030_keypad.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/input/keyboard/twl4030_keypad.c b/drivers/input/keyboard/twl4030_keypad.c
index 09bef79d9da1..cc06c4b2f920 100644
--- a/drivers/input/keyboard/twl4030_keypad.c
+++ b/drivers/input/keyboard/twl4030_keypad.c
@@ -338,7 +338,7 @@ static int __devinit twl4030_kp_probe(struct platform_device *pdev)
338 u8 reg; 338 u8 reg;
339 int error; 339 int error;
340 340
341 if (!pdata || !pdata->rows || !pdata->cols || 341 if (!pdata || !pdata->rows || !pdata->cols || !pdata->keymap_data ||
342 pdata->rows > TWL4030_MAX_ROWS || pdata->cols > TWL4030_MAX_COLS) { 342 pdata->rows > TWL4030_MAX_ROWS || pdata->cols > TWL4030_MAX_COLS) {
343 dev_err(&pdev->dev, "Invalid platform_data\n"); 343 dev_err(&pdev->dev, "Invalid platform_data\n");
344 return -EINVAL; 344 return -EINVAL;