* [PATCH -next] drm/fsl-dcu: use PTR_ERR_OR_ZERO() to simplify the code
@ 2016-07-25 7:08 Wei Yongjun
2016-09-05 19:26 ` Stefan Agner
0 siblings, 1 reply; 2+ messages in thread
From: Wei Yongjun @ 2016-07-25 7:08 UTC (permalink / raw)
To: Stefan Agner, Alison Wang, David Airlie
Cc: Wei Yongjun, dri-devel, linux-kernel
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>
---
drivers/gpu/drm/fsl-dcu/fsl_tcon.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/fsl-dcu/fsl_tcon.c b/drivers/gpu/drm/fsl-dcu/fsl_tcon.c
index bca09ea..3194e54 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)
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH -next] drm/fsl-dcu: use PTR_ERR_OR_ZERO() to simplify the code
2016-07-25 7:08 [PATCH -next] drm/fsl-dcu: use PTR_ERR_OR_ZERO() to simplify the code Wei Yongjun
@ 2016-09-05 19:26 ` Stefan Agner
0 siblings, 0 replies; 2+ messages in thread
From: Stefan Agner @ 2016-09-05 19:26 UTC (permalink / raw)
To: Wei Yongjun; +Cc: Alison Wang, David Airlie, dri-devel, linux-kernel
On 2016-07-25 00:08, Wei Yongjun wrote:
> 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>
Applied!
--
Stefan
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-09-05 19:32 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-25 7:08 [PATCH -next] drm/fsl-dcu: use PTR_ERR_OR_ZERO() to simplify the code Wei Yongjun
2016-09-05 19:26 ` Stefan Agner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome