summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/ttm/ttm_agp_backend.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2020-07-28 14:00:03 +1000
committerDave Airlie <airlied@redhat.com>2020-07-29 09:43:06 +1000
commit08bb88cfc4f0c5ac9053197ced139bf116a91280 (patch)
treed409d14529d971661be7c4db713f52d658fcb1f4 /drivers/gpu/drm/ttm/ttm_agp_backend.c
parent92be42392256b30296843aa4d987ad8d175c0e10 (diff)
drm/ttm: make ttm_tt unbind function return void.
The return value just led to BUG_ON, I think if a driver wants to BUG_ON here it can do it itself. (don't BUG_ON). Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Dave Airlie <airlied@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20200728040003.20398-1-airlied@gmail.com
Diffstat (limited to 'drivers/gpu/drm/ttm/ttm_agp_backend.c')
-rw-r--r--drivers/gpu/drm/ttm/ttm_agp_backend.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/gpu/drm/ttm/ttm_agp_backend.c b/drivers/gpu/drm/ttm/ttm_agp_backend.c
index 6050dc846894..38f1351140e2 100644
--- a/drivers/gpu/drm/ttm/ttm_agp_backend.c
+++ b/drivers/gpu/drm/ttm/ttm_agp_backend.c
@@ -82,17 +82,18 @@ static int ttm_agp_bind(struct ttm_tt *ttm, struct ttm_mem_reg *bo_mem)
return ret;
}
-static int ttm_agp_unbind(struct ttm_tt *ttm)
+static void ttm_agp_unbind(struct ttm_tt *ttm)
{
struct ttm_agp_backend *agp_be = container_of(ttm, struct ttm_agp_backend, ttm);
if (agp_be->mem) {
- if (agp_be->mem->is_bound)
- return agp_unbind_memory(agp_be->mem);
+ if (agp_be->mem->is_bound) {
+ agp_unbind_memory(agp_be->mem);
+ return;
+ }
agp_free_memory(agp_be->mem);
agp_be->mem = NULL;
}
- return 0;
}
static void ttm_agp_destroy(struct ttm_tt *ttm)