r600g: In radeon_bo(), call LIST_INITHEAD early.

radeon_bo_destroy() will want to read the list field. Without this patch,
we'd end up evaluating the list pointers before they have been properly
set up when we destroyed the newly created bo if it cannot be mapped.

Signed-off-by: Tilman Sauerbeck <tilman@code-monkey.de>
This commit is contained in:
Tilman Sauerbeck
2010-10-23 19:05:26 +02:00
parent 412b960883
commit c6b10cd986
+1 -1
View File
@@ -82,6 +82,7 @@ struct radeon_bo *radeon_bo(struct radeon *radeon, unsigned handle,
bo->handle = handle;
pipe_reference_init(&bo->reference, 1);
bo->alignment = alignment;
LIST_INITHEAD(&bo->fencedlist);
if (handle) {
struct drm_gem_open open_arg;
@@ -123,7 +124,6 @@ struct radeon_bo *radeon_bo(struct radeon *radeon, unsigned handle,
if (ptr) {
memcpy(bo->data, ptr, size);
}
LIST_INITHEAD(&bo->fencedlist);
return bo;
}