Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit df748b02 authored by Dave Airlie's avatar Dave Airlie Committed by Dave Airlie
Browse files

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: default avatarDave Airlie <airlied@redhat.com>
parent b8c00ac5
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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);