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

Commit acd4d615 authored by Wei Yongjun's avatar Wei Yongjun Committed by Stefan Agner
Browse files

drm/fsl-dcu: 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 <weiyj.lk@gmail.com>
Signed-off-by: default avatarStefan Agner <stefan@agner.ch>
parent 6cc4758a
Loading
Loading
Loading
Loading
+1 −4
Original line number Diff line number Diff line
@@ -57,10 +57,7 @@ static int fsl_tcon_init_regmap(struct device *dev,

	tcon->regs = devm_regmap_init_mmio(dev, regs,
					   &fsl_tcon_regmap_config);
	if (IS_ERR(tcon->regs))
		return PTR_ERR(tcon->regs);

	return 0;
	return PTR_ERR_OR_ZERO(tcon->regs);
}

struct fsl_tcon *fsl_tcon_init(struct device *dev)