diff options
author | Thomas Hellstrom <thellstrom@vmware.com> | 2012-11-20 07:16:50 -0500 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2012-11-28 03:36:14 -0500 |
commit | ae8df2ae8aa27bfeb8d1b99e8adaac5810a97fa8 (patch) | |
tree | 4f51e38c49344d3a097a9deef5965a61721c66ef /drivers/gpu/drm/ttm/ttm_object.c | |
parent | 35f62a582947ab151c013eaa8cf339e00a5941ab (diff) |
drm/ttm: Fix locking in an error path
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/ttm/ttm_object.c')
-rw-r--r-- | drivers/gpu/drm/ttm/ttm_object.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/drm/ttm/ttm_object.c b/drivers/gpu/drm/ttm/ttm_object.c index f18eeb458139..0e13d9f059ff 100644 --- a/drivers/gpu/drm/ttm/ttm_object.c +++ b/drivers/gpu/drm/ttm/ttm_object.c | |||
@@ -174,7 +174,9 @@ int ttm_base_object_init(struct ttm_object_file *tfile, | |||
174 | 174 | ||
175 | return 0; | 175 | return 0; |
176 | out_err1: | 176 | out_err1: |
177 | spin_lock(&tdev->object_lock); | ||
177 | (void)drm_ht_remove_item(&tdev->object_hash, &base->hash); | 178 | (void)drm_ht_remove_item(&tdev->object_hash, &base->hash); |
179 | spin_unlock(&tdev->object_lock); | ||
178 | out_err0: | 180 | out_err0: |
179 | return ret; | 181 | return ret; |
180 | } | 182 | } |