Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1720757 > unrolled thread
| Started by | Himanshu Jha <himanshujha199640@gmail.com> |
|---|---|
| First post | 2017-08-27 08:40 +0200 |
| Last post | 2017-08-27 20:50 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH] tty: serial: 8250_mtk: Use PTR_ERR_OR_ZERO Himanshu Jha <himanshujha199640@gmail.com> - 2017-08-27 08:40 +0200
Re: [PATCH] tty: serial: 8250_mtk: Use PTR_ERR_OR_ZERO Matthias Brugger <matthias.bgg@gmail.com> - 2017-08-27 20:50 +0200
| From | Himanshu Jha <himanshujha199640@gmail.com> |
|---|---|
| Date | 2017-08-27 08:40 +0200 |
| Subject | [PATCH] tty: serial: 8250_mtk: Use PTR_ERR_OR_ZERO |
| Message-ID | <uiZoJ-3VU-13@gated-at.bofh.it> |
Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR Signed-off-by: Himanshu Jha <himanshujha199640@gmail.com> --- drivers/tty/serial/8250/8250_mtk.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/tty/serial/8250/8250_mtk.c b/drivers/tty/serial/8250/8250_mtk.c index ce0cc47..fb45770 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) -- 2.7.4
[toc] | [next] | [standalone]
| From | Matthias Brugger <matthias.bgg@gmail.com> |
|---|---|
| Date | 2017-08-27 20:50 +0200 |
| Message-ID | <ujaNb-32e-9@gated-at.bofh.it> |
| In reply to | #1720757 |
On 08/27/2017 09:31 AM, Himanshu Jha wrote: > Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR > > Signed-off-by: Himanshu Jha <himanshujha199640@gmail.com> > --- > drivers/tty/serial/8250/8250_mtk.c | 5 +---- > 1 file changed, 1 insertion(+), 4 deletions(-) > > diff --git a/drivers/tty/serial/8250/8250_mtk.c b/drivers/tty/serial/8250/8250_mtk.c > index ce0cc47..fb45770 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); > } > Reviewed-by: Matthias Brugger <matthias.bgg@gmail.com>
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web