Commit 9f6d20ff authored by Alexey Khoroshilov's avatar Alexey Khoroshilov Committed by Greg Kroah-Hartman

tty/serial/sirf: fix error propagation in sirfsoc_uart_probe()

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: default avatarAlexey Khoroshilov <khoroshilov@ispras.ru>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 7f25301d
...@@ -687,10 +687,11 @@ int sirfsoc_uart_probe(struct platform_device *pdev) ...@@ -687,10 +687,11 @@ int sirfsoc_uart_probe(struct platform_device *pdev)
if (sirfport->hw_flow_ctrl) { if (sirfport->hw_flow_ctrl) {
sirfport->p = pinctrl_get_select_default(&pdev->dev); sirfport->p = pinctrl_get_select_default(&pdev->dev);
ret = IS_ERR(sirfport->p); if (IS_ERR(sirfport->p)) {
if (ret) ret = PTR_ERR(sirfport->p);
goto err; goto err;
} }
}
sirfport->clk = clk_get(&pdev->dev, NULL); sirfport->clk = clk_get(&pdev->dev, NULL);
if (IS_ERR(sirfport->clk)) { if (IS_ERR(sirfport->clk)) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment