From: Axel Lin Date: Fri, 23 Sep 2016 22:01:07 +0000 (-0700) Subject: Input: snvs_pwrkey - drop input_free_device call if input_register_device fails X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=d095c500fd79421f915cea26925677cd16ecd623;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git Input: snvs_pwrkey - drop input_free_device call if input_register_device fails Current code uses devm_input_allocate_device() so don't explicitly call input_free_device if input_register_device fails. Signed-off-by: Axel Lin Signed-off-by: Dmitry Torokhov --- diff --git a/drivers/input/keyboard/snvs_pwrkey.c b/drivers/input/keyboard/snvs_pwrkey.c index 24a9f599082f..7544888c4749 100644 --- a/drivers/input/keyboard/snvs_pwrkey.c +++ b/drivers/input/keyboard/snvs_pwrkey.c @@ -168,7 +168,6 @@ static int imx_snvs_pwrkey_probe(struct platform_device *pdev) error = input_register_device(input); if (error < 0) { dev_err(&pdev->dev, "failed to register input device\n"); - input_free_device(input); return error; }