diff options
author | Rob Clark <robdclark@chromium.org> | 2020-10-23 19:51:11 +0300 |
---|---|---|
committer | Rob Clark <robdclark@chromium.org> | 2020-11-05 03:00:56 +0300 |
commit | ce0a9dc009da93cf0a347a110ab237def1eae520 (patch) | |
tree | 6f35589ec58d628fb330a0b933831796fe44e536 /drivers/gpu/drm/msm | |
parent | 6c0e3ea25047694f97d01fb88c23ed5c4ed44da3 (diff) | |
download | linux-ce0a9dc009da93cf0a347a110ab237def1eae520.tar.xz |
drm/msm: Use correct drm_gem_object_put() in fail case
We only want to use the _unlocked() variant in the unlocked case.
Signed-off-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Signed-off-by: Rob Clark <robdclark@chromium.org>
Diffstat (limited to 'drivers/gpu/drm/msm')
-rw-r--r-- | drivers/gpu/drm/msm/msm_gem.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/gpu/drm/msm/msm_gem.c b/drivers/gpu/drm/msm/msm_gem.c index 6935c4437ef9..a0baea2e96c8 100644 --- a/drivers/gpu/drm/msm/msm_gem.c +++ b/drivers/gpu/drm/msm/msm_gem.c @@ -1139,7 +1139,11 @@ static struct drm_gem_object *_msm_gem_new(struct drm_device *dev, return obj; fail: - drm_gem_object_put(obj); + if (struct_mutex_locked) { + drm_gem_object_put_locked(obj); + } else { + drm_gem_object_put(obj); + } return ERR_PTR(ret); } |