The following patch fix a potential null pointer dereference in twl4030 keypad driver when parts of keypad platform_data aren't passed down to the driver. At that point kp->dbg_dev is not set yet. Signed-off-by: Felipe Balbi <felipe.balbi@xxxxxxxxx> --- drivers/input/keyboard/omap-twl4030keypad.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/input/keyboard/omap-twl4030keypad.c b/drivers/input/keyboard/omap-twl4030keypad.c index 3893d63..48f29d3 100644 --- a/drivers/input/keyboard/omap-twl4030keypad.c +++ b/drivers/input/keyboard/omap-twl4030keypad.c @@ -238,7 +238,7 @@ static int __init omap_kp_probe(struct platform_device *pdev) return -ENOMEM; if (!pdata->rows || !pdata->cols || !pdata->keymap) { - dev_err(kp->dbg_dev, "No rows, cols or keymap from pdata\n"); + dev_err(&pdev->dev, "No rows, cols or keymap from pdata\n"); kfree(kp); return -EINVAL; } -- 1.6.0.2.307.gc427 -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html