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
This commit is contained in:
Sean Paul 2019-05-23 13:16:42 -04:00
parent cfcb365861
commit 5ca4a094ba

View File

@ -504,8 +504,10 @@ static void a6xx_gmu_rpmh_init(struct a6xx_gmu *gmu)
wmb(); wmb();
err: err:
devm_iounmap(gmu->dev, pdcptr); if (!IS_ERR_OR_NULL(pdcptr))
devm_iounmap(gmu->dev, seqptr); devm_iounmap(gmu->dev, pdcptr);
if (!IS_ERR_OR_NULL(seqptr))
devm_iounmap(gmu->dev, seqptr);
} }
/* /*