aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/bochs/bochs_mm.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/bochs/bochs_mm.c')
-rw-r--r--drivers/gpu/drm/bochs/bochs_mm.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/gpu/drm/bochs/bochs_mm.c b/drivers/gpu/drm/bochs/bochs_mm.c
index f488be55d650..b9a695d92792 100644
--- a/drivers/gpu/drm/bochs/bochs_mm.c
+++ b/drivers/gpu/drm/bochs/bochs_mm.c
@@ -434,17 +434,13 @@ static void bochs_bo_unref(struct bochs_bo **bo)
434 434
435 tbo = &((*bo)->bo); 435 tbo = &((*bo)->bo);
436 ttm_bo_unref(&tbo); 436 ttm_bo_unref(&tbo);
437 if (tbo == NULL) 437 *bo = NULL;
438 *bo = NULL;
439
440} 438}
441 439
442void bochs_gem_free_object(struct drm_gem_object *obj) 440void bochs_gem_free_object(struct drm_gem_object *obj)
443{ 441{
444 struct bochs_bo *bochs_bo = gem_to_bochs_bo(obj); 442 struct bochs_bo *bochs_bo = gem_to_bochs_bo(obj);
445 443
446 if (!bochs_bo)
447 return;
448 bochs_bo_unref(&bochs_bo); 444 bochs_bo_unref(&bochs_bo);
449} 445}
450 446