Skip to content

Commit

Permalink
Input: twl4030_keypad - avoid potential NULL-pointer dereference
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Shubhrajyoti D authored and Dmitry Torokhov committed Apr 6, 2011
1 parent e28e1d9 commit 8f74c06
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/input/keyboard/twl4030_keypad.c
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ static int __devinit twl4030_kp_probe(struct platform_device *pdev)
u8 reg;
int error;

if (!pdata || !pdata->rows || !pdata->cols ||
if (!pdata || !pdata->rows || !pdata->cols || !pdata->keymap_data ||
pdata->rows > TWL4030_MAX_ROWS || pdata->cols > TWL4030_MAX_COLS) {
dev_err(&pdev->dev, "Invalid platform_data\n");
return -EINVAL;
Expand Down

0 comments on commit 8f74c06

Please sign in to comment.