Skip to content

Commit

Permalink
drm/ttm: Fix locking in an error path
Browse files Browse the repository at this point in the history
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
  • Loading branch information
Thomas Hellstrom authored and Dave Airlie committed Nov 28, 2012
1 parent 35f62a5 commit ae8df2a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/gpu/drm/ttm/ttm_object.c
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,9 @@ int ttm_base_object_init(struct ttm_object_file *tfile,

return 0;
out_err1:
spin_lock(&tdev->object_lock);
(void)drm_ht_remove_item(&tdev->object_hash, &base->hash);
spin_unlock(&tdev->object_lock);
out_err0:
return ret;
}
Expand Down

0 comments on commit ae8df2a

Please sign in to comment.