Skip to content

Commit

Permalink
tty: serial: 8250_mtk: Use PTR_ERR_OR_ZERO
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Himanshu Jha authored and Greg Kroah-Hartman committed Aug 28, 2017
1 parent dde6826 commit d77dc47
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions drivers/tty/serial/8250/8250_mtk.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit d77dc47

Please sign in to comment.