drm/fsl-dcu: use PTR_ERR_OR_ZERO() to simplify the code
Subsystems (3)
PATCH 1/1 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 <[email protected]>
--- drivers/gpu/drm/fsl-dcu/fsl_tcon.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)
drivers/gpu/drm/fsl-dcu/fsl_tcon.c +1 -4
@@ -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)
Quoted 5 lines · Wei Yongjun
Use
PTR_ERR_OR_ZEROrather than if(IS_ERR(...)) +PTR_ERR.Generated by:
scripts/coccinelle/api/ptr_ret.cocciSigned-off-by Wei Yongjun <[email protected]>
Applied!
--
Stefan
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel