projects
/
platform
/
kernel
/
linux-starfive.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cfcb365
)
drm/msm/a6xx: Check for ERR or NULL before iounmap
author
Sean Paul
<seanpaul@chromium.org>
Thu, 23 May 2019 17:16:42 +0000
(13:16 -0400)
committer
Sean Paul
<seanpaul@chromium.org>
Fri, 24 May 2019 13:53:20 +0000
(09:53 -0400)
pdcptr and seqptr aren't necessarily valid, check them before trying to
unmap them.
Changes in v2:
- None
Cc: Jordan Crouse <jcrouse@codeaurora.org>
Reviewed-by: Jordan Crouse <jcrouse@codeaurora.org>
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Link:
https://patchwork.freedesktop.org/patch/msgid/20190523171653.138678-3-sean@poorly.run
drivers/gpu/drm/msm/adreno/a6xx_gmu.c
patch
|
blob
|
history
diff --git
a/drivers/gpu/drm/msm/adreno/a6xx_gmu.c
b/drivers/gpu/drm/msm/adreno/a6xx_gmu.c
index
742c8ff
..
7465423
100644
(file)
--- a/
drivers/gpu/drm/msm/adreno/a6xx_gmu.c
+++ b/
drivers/gpu/drm/msm/adreno/a6xx_gmu.c
@@
-504,8
+504,10
@@
static void a6xx_gmu_rpmh_init(struct a6xx_gmu *gmu)
wmb();
err:
- devm_iounmap(gmu->dev, pdcptr);
- devm_iounmap(gmu->dev, seqptr);
+ if (!IS_ERR_OR_NULL(pdcptr))
+ devm_iounmap(gmu->dev, pdcptr);
+ if (!IS_ERR_OR_NULL(seqptr))
+ devm_iounmap(gmu->dev, seqptr);
}
/*