omap: release lock also on error paths

Signed-off-by: Rob Clark <rob@ti.com>
main
Vincent Penquerc'h 2012-10-09 14:48:34 +01:00 committed by Rob Clark
parent 14db948127
commit 28a13f0be7
1 changed files with 2 additions and 0 deletions

View File

@ -304,6 +304,7 @@ struct omap_bo * omap_bo_from_name(struct omap_device *dev, uint32_t name)
return bo; return bo;
fail: fail:
pthread_mutex_unlock(&table_lock);
free(bo); free(bo);
return NULL; return NULL;
} }
@ -337,6 +338,7 @@ struct omap_bo * omap_bo_from_dmabuf(struct omap_device *dev, int fd)
return bo; return bo;
fail: fail:
pthread_mutex_unlock(&table_lock);
free(bo); free(bo);
return NULL; return NULL;
} }