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: Wei Yongjun <weiyj.lk@gmail.com>
Signed-off-by: Stefan Agner <stefan@agner.ch>
This commit is contained in:
Wei Yongjun 2016-07-25 07:08:07 +00:00 committed by Stefan Agner
parent 6cc4758ae9
commit acd4d615bc

View File

@ -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)