(v2): Remove stray ; noticed by Felix
Signed-off-by: Tom St Denis <tom.stdenis@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
        .mode = S_IRUGO
 };
 
+/* default destructor */
+static void ttm_bo_default_destroy(struct ttm_buffer_object *bo)
+{
+       kfree(bo);
+}
+
 static inline int ttm_mem_type_from_place(const struct ttm_place *place,
                                          uint32_t *mem_type)
 {
        dma_fence_put(bo->moving);
        reservation_object_fini(&bo->ttm_resv);
        mutex_destroy(&bo->wu_mutex);
-       if (bo->destroy)
-               bo->destroy(bo);
-       else
-               kfree(bo);
+       bo->destroy(bo);
        ttm_mem_global_free(bdev->glob->mem_glob, acc_size);
 }
 
                ttm_mem_global_free(mem_glob, acc_size);
                return -EINVAL;
        }
-       bo->destroy = destroy;
+       bo->destroy = destroy ? destroy : ttm_bo_default_destroy;
 
        kref_init(&bo->kref);
        kref_init(&bo->list_kref);