forked from Minki/linux
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:
parent
cfcb365861
commit
5ca4a094ba
@ -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);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Loading…
Reference in New Issue
Block a user