From: Thomas Hellstrom Date: Tue, 20 Nov 2012 12:16:50 +0000 (+0000) Subject: drm/ttm: Fix locking in an error path X-Git-Tag: next-20121205~75^2~120 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=ae8df2ae8aa27bfeb8d1b99e8adaac5810a97fa8;p=karo-tx-linux.git drm/ttm: Fix locking in an error path Signed-off-by: Thomas Hellstrom Signed-off-by: Dave Airlie --- 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, 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; }