aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drivers/mfd/glamo/glamo-buffer.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/mfd/glamo/glamo-buffer.c b/drivers/mfd/glamo/glamo-buffer.c
index e1c973c66af..a6d085f3303 100644
--- a/drivers/mfd/glamo/glamo-buffer.c
+++ b/drivers/mfd/glamo/glamo-buffer.c
@@ -319,7 +319,9 @@ void glamodrm_gem_free_object(struct drm_gem_object *obj)
gobj = obj->driver_private;
/* Free the VRAM */
- drm_mm_put_block(gobj->block);
+ if ( gobj->block != NULL ) {
+ drm_mm_put_block(gobj->block);
+ }
/* Release mappings */
list = &obj->map_list;