Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0d2665b6 authored by Wei Yongjun's avatar Wei Yongjun Committed by Greg Kroah-Hartman
Browse files

serial: mxs-auart: Use PTR_ERR_OR_ZERO() to simplify the code



Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR.

Generated by: scripts/coccinelle/api/ptr_ret.cocci

Signed-off-by: default avatarWei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 5d7519df
Loading
Loading
Loading
Loading
+1 −4
Original line number Diff line number Diff line
@@ -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");