]> git.karo-electronics.de Git - karo-tx-linux.git/commit
drm/msm: Don't increase priv->num_aspaces until we know that it fits
authorJordan Crouse <jcrouse@codeaurora.org>
Tue, 7 Mar 2017 16:50:28 +0000 (09:50 -0700)
committerRob Clark <robdclark@gmail.com>
Sat, 8 Apr 2017 10:59:32 +0000 (06:59 -0400)
commit36849cc361428b0b60c9065f854fe22bd55ce3ab
treeef8938ec8f7b62c0fbd786be8ed2c890901552f7
parent2002c9c33259fd9147ebe949142f0b585bbfe869
drm/msm: Don't increase priv->num_aspaces until we know that it fits

priv->num_aspaces is increased and then checked to see if it still fits
in the priv->aspace array.  If it doesn't, we warn and exit but
priv->num_aspaces remains incremented.

Don't incremement the count until we know that it fits in the array.

Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
Signed-off-by: Rob Clark <robdclark@gmail.com>
drivers/gpu/drm/msm/msm_drv.c