projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5d7519d
)
serial: mxs-auart: Use PTR_ERR_OR_ZERO() to simplify the code
author
Wei Yongjun
<weiyongjun1@huawei.com>
Sat, 10 Sep 2016 12:22:17 +0000
(12:22 +0000)
committer
Greg Kroah-Hartman
<gregkh@linuxfoundation.org>
Tue, 13 Sep 2016 16:54:34 +0000
(18:54 +0200)
Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR.
Generated by: scripts/coccinelle/api/ptr_ret.cocci
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/mxs-auart.c
patch
|
blob
|
history
diff --git
a/drivers/tty/serial/mxs-auart.c
b/drivers/tty/serial/mxs-auart.c
index 680270b85ff7cf6499227aa5f47ee4a0243426cf..ec0ab33efd9dad24ff72d76fb247ce535807548e 100644
(file)
--- a/
drivers/tty/serial/mxs-auart.c
+++ b/
drivers/tty/serial/mxs-auart.c
@@
-1510,10
+1510,7
@@
static int mxs_get_clks(struct mxs_auart_port *s,
if (!is_asm9260_auart(s)) {
s->clk = devm_clk_get(&pdev->dev, NULL);
- if (IS_ERR(s->clk))
- return PTR_ERR(s->clk);
-
- return 0;
+ return PTR_ERR_OR_ZERO(s->clk);
}
s->clk = devm_clk_get(s->dev, "mod");