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

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
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -504,7 +504,9 @@ static void a6xx_gmu_rpmh_init(struct a6xx_gmu *gmu)
	wmb();

err:
	if (!IS_ERR_OR_NULL(pdcptr))
		devm_iounmap(gmu->dev, pdcptr);
	if (!IS_ERR_OR_NULL(seqptr))
		devm_iounmap(gmu->dev, seqptr);
}