Commit 5ca4a094 authored by Sean Paul's avatar Sean Paul

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: default avatarJordan Crouse <jcrouse@codeaurora.org>
Signed-off-by: default avatarSean Paul <seanpaul@chromium.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20190523171653.138678-3-sean@poorly.run
parent cfcb3658
......@@ -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);
}
/*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment