diff options
author | Sean Paul <seanpaul@chromium.org> | 2019-05-23 13:16:42 -0400 |
---|---|---|
committer | Sean Paul <seanpaul@chromium.org> | 2019-05-24 09:53:20 -0400 |
commit | 5ca4a094ba7e1369363dcbcbde8baf06ddcdc2d1 (patch) | |
tree | 3b1a71346097d80bcf7bbeef16f31971f4286d80 /drivers/gpu/drm/msm/adreno | |
parent | cfcb365861b77389f7fbc9c8153a08c62ae390af (diff) | |
download | linux-5ca4a094ba7e1369363dcbcbde8baf06ddcdc2d1.tar.gz linux-5ca4a094ba7e1369363dcbcbde8baf06ddcdc2d1.tar.bz2 linux-5ca4a094ba7e1369363dcbcbde8baf06ddcdc2d1.zip |
drm/msm/a6xx: Check for ERR or NULL before iounmap
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
Diffstat (limited to 'drivers/gpu/drm/msm/adreno')
-rw-r--r-- | drivers/gpu/drm/msm/adreno/a6xx_gmu.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/gpu/drm/msm/adreno/a6xx_gmu.c b/drivers/gpu/drm/msm/adreno/a6xx_gmu.c index 742c8ff9a61c..7465423e9b71 100644 --- 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); } /* |