Skip to content

Commit

Permalink
drm/msm: Use correct drm_gem_object_put() in fail case
Browse files Browse the repository at this point in the history
We only want to use the _unlocked() variant in the unlocked case.

Signed-off-by: Rob Clark <[email protected]>
Reviewed-by: Kristian H. Kristensen <[email protected]>
Signed-off-by: Rob Clark <[email protected]>
  • Loading branch information
robclark committed Nov 5, 2020
1 parent 6c0e3ea commit ce0a9dc
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion drivers/gpu/drm/msm/msm_gem.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit ce0a9dc

Please sign in to comment.