提交 5ca4a094 编写于 作者: S 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: NJordan Crouse <jcrouse@codeaurora.org>
Signed-off-by: NSean Paul <seanpaul@chromium.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20190523171653.138678-3-sean@poorly.run
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册