提交 d77dc47f 编写于 作者: H Himanshu Jha 提交者: Greg Kroah-Hartman

tty: serial: 8250_mtk: Use PTR_ERR_OR_ZERO

Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR
Signed-off-by: NHimanshu Jha <himanshujha199640@gmail.com>
Reviewed-by: NMatthias Brugger <matthias.bgg@gmail.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 dde68266
...@@ -171,10 +171,7 @@ static int mtk8250_probe_of(struct platform_device *pdev, struct uart_port *p, ...@@ -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"); data->bus_clk = devm_clk_get(&pdev->dev, "bus");
if (IS_ERR(data->bus_clk)) return PTR_ERR_OR_ZERO(data->bus_clk);
return PTR_ERR(data->bus_clk);
return 0;
} }
static int mtk8250_probe(struct platform_device *pdev) static int mtk8250_probe(struct platform_device *pdev)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册