From: Dave Airlie Date: Tue, 29 Sep 2009 03:56:38 +0000 (+1000) Subject: drm/ttm: fix refcounting in ttm global code. X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=df748b025d1357c2b9659e16a6040596e60e4257;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git drm/ttm: fix refcounting in ttm global code. the global refcount wasn't being increased after the first reference. this caused an oops on unload on a multi-gpu card. Signed-off-by: Dave Airlie --- diff --git a/drivers/gpu/drm/ttm/ttm_global.c b/drivers/gpu/drm/ttm/ttm_global.c index 541744d00d3e..b17007178a36 100644 --- a/drivers/gpu/drm/ttm/ttm_global.c +++ b/drivers/gpu/drm/ttm/ttm_global.c @@ -82,8 +82,8 @@ int ttm_global_item_ref(struct ttm_global_reference *ref) if (unlikely(ret != 0)) goto out_err; - ++item->refcount; } + ++item->refcount; ref->object = item->object; object = item->object; mutex_unlock(&item->mutex);