aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/tty/serial/sirfsoc_uart.c
diff options
context:
space:
mode:
authorAlexey Khoroshilov <khoroshilov@ispras.ru>2013-06-06 01:28:12 +0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-06-06 13:07:05 -0700
commit9f6d20ff848c23506c2ec55431479cb350179886 (patch)
tree1670aae9b3bf74a9ad6afdfc02c4e57d4940bcee /drivers/tty/serial/sirfsoc_uart.c
parentserial: omap: fix potential NULL pointer dereference in serial_omap_runtime_suspend() (diff)
downloadlinux-dev-9f6d20ff848c23506c2ec55431479cb350179886.tar.xz
linux-dev-9f6d20ff848c23506c2ec55431479cb350179886.zip
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: Alexey Khoroshilov <khoroshilov@ispras.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/serial/sirfsoc_uart.c')
-rw-r--r--drivers/tty/serial/sirfsoc_uart.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/tty/serial/sirfsoc_uart.c b/drivers/tty/serial/sirfsoc_uart.c
index 03465b673945..1fd564b8194b 100644
--- a/drivers/tty/serial/sirfsoc_uart.c
+++ b/drivers/tty/serial/sirfsoc_uart.c
@@ -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);