]> Pileus Git - ~andy/linux/commitdiff
tty/serial/sirf: fix error propagation in sirfsoc_uart_probe()
authorAlexey Khoroshilov <khoroshilov@ispras.ru>
Wed, 5 Jun 2013 21:28:12 +0000 (01:28 +0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 6 Jun 2013 20:07:05 +0000 (13:07 -0700)
If pinctrl_get_select_default() fails, sirfsoc_uart_probe()
returns IS_ERR(result) instead of PTR_ERR(result).

Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/sirfsoc_uart.c

index 03465b673945c0c76d65596bb2e50bec010f31e9..1fd564b8194b7affe59be4ae0d3b827829c7ba8a 100644 (file)
@@ -687,9 +687,10 @@ int sirfsoc_uart_probe(struct platform_device *pdev)
 
        if (sirfport->hw_flow_ctrl) {
                sirfport->p = pinctrl_get_select_default(&pdev->dev);
-               ret = IS_ERR(sirfport->p);
-               if (ret)
+               if (IS_ERR(sirfport->p)) {
+                       ret = PTR_ERR(sirfport->p);
                        goto err;
+               }
        }
 
        sirfport->clk = clk_get(&pdev->dev, NULL);