Browse Source

Merge tag 'ttm-fixes-3.14-2014-02-18' of git://people.freedesktop.org/~thomash/linux into drm-fixes

Pull request of 2014-02-18

One compile fix and one memory leak.

* tag 'ttm-fixes-3.14-2014-02-18' of git://people.freedesktop.org/~thomash/linux:
  drm/ttm: Fix memory leak in ttm_agp_backend.c
  drm/ttm: declare 'struct device' in ttm_page_alloc.h
Dave Airlie 11 years ago
parent
commit
75936c65dd
2 changed files with 3 additions and 0 deletions
  1. 1 0
      drivers/gpu/drm/ttm/ttm_agp_backend.c
  2. 2 0
      include/drm/ttm/ttm_page_alloc.h

+ 1 - 0
drivers/gpu/drm/ttm/ttm_agp_backend.c

@@ -126,6 +126,7 @@ struct ttm_tt *ttm_agp_tt_create(struct ttm_bo_device *bdev,
 	agp_be->ttm.func = &ttm_agp_func;
 
 	if (ttm_tt_init(&agp_be->ttm, bdev, size, page_flags, dummy_read_page)) {
+		kfree(agp_be);
 		return NULL;
 	}
 

+ 2 - 0
include/drm/ttm/ttm_page_alloc.h

@@ -29,6 +29,8 @@
 #include <drm/ttm/ttm_bo_driver.h>
 #include <drm/ttm/ttm_memory.h>
 
+struct device;
+
 /**
  * Initialize pool allocator.
  */