projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ae45577
)
drm/sti: correctly test devm_ioremap() return
author
Wei Yongjun
<
[email protected]
>
Mon, 8 Jun 2015 13:25:52 +0000
(15:25 +0200)
committer
Benjamin Gaignard
<
[email protected]
>
Mon, 8 Jun 2015 13:28:10 +0000
(15:28 +0200)
In case of error, the function devm_ioremap_nocache() returns NULL
not ERR_PTR(). The IS_ERR() test in the return value check should
be replaced with NULL test.
Signed-off-by: Wei Yongjun <
[email protected]
>
drivers/gpu/drm/sti/sti_dvo.c
patch
|
blob
|
history
diff --git
a/drivers/gpu/drm/sti/sti_dvo.c
b/drivers/gpu/drm/sti/sti_dvo.c
index a9b678af85a6f315716fa82871674519e017b9f3..d141d645bd13acd47c99b9c6b1de839e442fc280 100644
(file)
--- a/
drivers/gpu/drm/sti/sti_dvo.c
+++ b/
drivers/gpu/drm/sti/sti_dvo.c
@@
-499,8
+499,8
@@
static int sti_dvo_probe(struct platform_device *pdev)
}
dvo->regs = devm_ioremap_nocache(dev, res->start,
resource_size(res));
- if (
IS_ERR(dvo->regs)
)
- return
PTR_ERR(dvo->regs)
;
+ if (
!dvo->regs
)
+ return
-ENOMEM
;
dvo->clk_pix = devm_clk_get(dev, "dvo_pix");
if (IS_ERR(dvo->clk_pix)) {