projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ba95c45
)
drm/ttm: fix ttm_bo_add_ttm(user) failure path
author
Marcin Slusarz
<
[email protected]
>
Mon, 22 Aug 2011 21:17:57 +0000
(21:17 +0000)
committer
Dave Airlie
<
[email protected]
>
Tue, 23 Aug 2011 08:34:18 +0000
(09:34 +0100)
ttm_tt_destroy kfrees passed object, so we need to nullify
a reference to it.
Signed-off-by: Marcin Slusarz <
[email protected]
>
Cc:
[email protected]
Reviewed-by: Thomas Hellstrom <
[email protected]
>
Signed-off-by: Dave Airlie <
[email protected]
>
drivers/gpu/drm/ttm/ttm_bo.c
patch
|
blob
|
history
diff --git
a/drivers/gpu/drm/ttm/ttm_bo.c
b/drivers/gpu/drm/ttm/ttm_bo.c
index 56619f64b6bfa004c9b1900ac3dd36328593a6cf..384116afe5b7f4e0d47797253cc12fb0bd417770 100644
(file)
--- a/
drivers/gpu/drm/ttm/ttm_bo.c
+++ b/
drivers/gpu/drm/ttm/ttm_bo.c
@@
-353,8
+353,10
@@
static int ttm_bo_add_ttm(struct ttm_buffer_object *bo, bool zero_alloc)
ret = ttm_tt_set_user(bo->ttm, current,
bo->buffer_start, bo->num_pages);
- if (unlikely(ret != 0))
+ if (unlikely(ret != 0))
{
ttm_tt_destroy(bo->ttm);
+ bo->ttm = NULL;
+ }
break;
default:
printk(KERN_ERR TTM_PFX "Illegal buffer object type\n");