diff options
author | Wei Yongjun <weiyj.lk@gmail.com> | 2016-07-25 07:08:07 +0000 |
---|---|---|
committer | Stefan Agner <stefan@agner.ch> | 2016-09-05 12:15:41 -0700 |
commit | acd4d615bc5b4035a542ea3458fdee3b5d6f0f78 (patch) | |
tree | e39a99914615f9a949bc7a764e114a8e4581bc5c /drivers/gpu/drm/fsl-dcu | |
parent | 6cc4758ae91c0582f07e3c94c7de1ad0975feff5 (diff) |
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>
Diffstat (limited to 'drivers/gpu/drm/fsl-dcu')
-rw-r--r-- | drivers/gpu/drm/fsl-dcu/fsl_tcon.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/gpu/drm/fsl-dcu/fsl_tcon.c b/drivers/gpu/drm/fsl-dcu/fsl_tcon.c index bca09ea24632..3194e544ee27 100644 --- a/drivers/gpu/drm/fsl-dcu/fsl_tcon.c +++ b/drivers/gpu/drm/fsl-dcu/fsl_tcon.c @@ -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) |