summaryrefslogtreecommitdiffstats
path: root/drivers/tty/serial/8250
diff options
context:
space:
mode:
authorHimanshu Jha <himanshujha199640@gmail.com>2017-08-27 08:31:41 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-08-28 20:51:20 +0200
commitd77dc47fce23daf57f60cb407698108229a33e8c (patch)
tree90ad871110af4fd69358a328064cfdf201233b3f /drivers/tty/serial/8250
parentdt-bindings: serial: sh-sci: Add support for r8a77995 (H)SCIF (diff)
downloadlinux-d77dc47fce23daf57f60cb407698108229a33e8c.tar.xz
linux-d77dc47fce23daf57f60cb407698108229a33e8c.zip
tty: serial: 8250_mtk: Use PTR_ERR_OR_ZERO
Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR Signed-off-by: Himanshu Jha <himanshujha199640@gmail.com> Reviewed-by: Matthias Brugger <matthias.bgg@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/serial/8250')
-rw-r--r--drivers/tty/serial/8250/8250_mtk.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/tty/serial/8250/8250_mtk.c b/drivers/tty/serial/8250/8250_mtk.c
index ce0cc471bfc3..fb45770d47aa 100644
--- a/drivers/tty/serial/8250/8250_mtk.c
+++ b/drivers/tty/serial/8250/8250_mtk.c
@@ -171,10 +171,7 @@ static int mtk8250_probe_of(struct platform_device *pdev, struct uart_port *p,
}
data->bus_clk = devm_clk_get(&pdev->dev, "bus");
- if (IS_ERR(data->bus_clk))
- return PTR_ERR(data->bus_clk);
-
- return 0;
+ return PTR_ERR_OR_ZERO(data->bus_clk);
}
static int mtk8250_probe(struct platform_device *pdev)