From: Fabio Estevam <fabio.estevam@xxxxxxxxxxxxx> There is no need to print an error message in the driver for devm_kzalloc() failure because OOM core code handles it properly. Signed-off-by: Fabio Estevam <fabio.estevam@xxxxxxxxxxxxx> --- drivers/input/keyboard/imx_keypad.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/input/keyboard/imx_keypad.c b/drivers/input/keyboard/imx_keypad.c index de07035..40ad98d 100644 --- a/drivers/input/keyboard/imx_keypad.c +++ b/drivers/input/keyboard/imx_keypad.c @@ -450,10 +450,8 @@ static int imx_keypad_probe(struct platform_device *pdev) keypad = devm_kzalloc(&pdev->dev, sizeof(struct imx_keypad), GFP_KERNEL); - if (!keypad) { - dev_err(&pdev->dev, "not enough memory for driver data\n"); + if (!keypad) return -ENOMEM; - } keypad->input_dev = input_dev; keypad->irq = irq; -- 1.8.1.2 -- To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html