Input: opencores-kbd - fix error handling
authorDmitry Torokhov <dmitry.torokhov@gmail.com>
Fri, 24 Oct 2014 21:27:25 +0000 (14:27 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Tue, 28 Oct 2014 17:32:59 +0000 (10:32 -0700)
When I was adjusting patch in 848d479361793edb79aa68140cb64d4ec9032d88 to
use devm_ioremap_resource() I messed it up.

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/keyboard/opencores-kbd.c

index 62abe2c166707c080e7f68cf1f5305e2955ee1c5..f8502bb291767c539d1a204ed34bc09d3e90c4b0 100644 (file)
@@ -70,7 +70,7 @@ static int opencores_kbd_probe(struct platform_device *pdev)
 
        opencores_kbd->addr = devm_ioremap_resource(&pdev->dev, res);
        if (IS_ERR(opencores_kbd->addr))
-               error = PTR_ERR(opencores_kbd->addr);
+               return PTR_ERR(opencores_kbd->addr);
 
        input->name = pdev->name;
        input->phys = "opencores-kbd/input0";