Input: snvs_pwrkey - drop input_free_device call if input_register_device fails
authorAxel Lin <axel.lin@ingics.com>
Fri, 23 Sep 2016 22:01:07 +0000 (15:01 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Tue, 27 Sep 2016 03:01:59 +0000 (20:01 -0700)
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 <axel.lin@ingics.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/keyboard/snvs_pwrkey.c

index 24a9f599082f7b690b05eba15d3619e5cd0aed74..7544888c47494ef96030be6990d58d0b8aa3f2c3 100644 (file)
@@ -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;
        }