since derefing the object might free it.
Signed-off-by: Dave Airlie <airlied@redhat.com>
void radeon_bo_unref(struct radeon_bo **bo)
{
struct ttm_buffer_object *tbo;
void radeon_bo_unref(struct radeon_bo **bo)
{
struct ttm_buffer_object *tbo;
+ struct radeon_device *rdev;
if ((*bo) == NULL)
return;
if ((*bo) == NULL)
return;
- mutex_lock(&(*bo)->rdev->vram_mutex);
+ mutex_lock(&rdev->vram_mutex);
- mutex_unlock(&(*bo)->rdev->vram_mutex);
+ mutex_unlock(&rdev->vram_mutex);
if (tbo == NULL)
*bo = NULL;
}
if (tbo == NULL)
*bo = NULL;
}