From 28a13f0be734958c74ae5a23d9cf766fa0857a62 Mon Sep 17 00:00:00 2001
From: Vincent Penquerc'h <vincent.penquerch@collabora.co.uk>
Date: Tue, 9 Oct 2012 14:48:34 +0100
Subject: omap: release lock also on error paths

Signed-off-by: Rob Clark <rob@ti.com>
---
 omap/omap_drm.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/omap/omap_drm.c b/omap/omap_drm.c
index cd8e8bc4..89f14911 100644
--- a/omap/omap_drm.c
+++ b/omap/omap_drm.c
@@ -304,6 +304,7 @@ struct omap_bo * omap_bo_from_name(struct omap_device *dev, uint32_t name)
 	return bo;
 
 fail:
+	pthread_mutex_unlock(&table_lock);
 	free(bo);
 	return NULL;
 }
@@ -337,6 +338,7 @@ struct omap_bo * omap_bo_from_dmabuf(struct omap_device *dev, int fd)
 	return bo;
 
 fail:
+	pthread_mutex_unlock(&table_lock);
 	free(bo);
 	return NULL;
 }
-- 
cgit v1.2.3