projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6cc4758
)
drm/fsl-dcu: use PTR_ERR_OR_ZERO() to simplify the code
author
Wei Yongjun
<weiyj.lk@gmail.com>
Mon, 25 Jul 2016 07:08:07 +0000
(07:08 +0000)
committer
Stefan Agner
<stefan@agner.ch>
Mon, 5 Sep 2016 19:15:41 +0000
(12:15 -0700)
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>
drivers/gpu/drm/fsl-dcu/fsl_tcon.c
patch
|
blob
|
history
diff --git
a/drivers/gpu/drm/fsl-dcu/fsl_tcon.c
b/drivers/gpu/drm/fsl-dcu/fsl_tcon.c
index bca09ea24632424f6899ff5c9ac9b4a1017a2300..3194e544ee27b902c4a300d2972781a832d54997 100644
(file)
--- 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)