drm/etnaviv: unlock on error in etnaviv_gem_get_iova()

We have to drop a lock before returning -ENOMEM here.

Fixes: a8c21a5451 ('drm/etnaviv: add initial etnaviv DRM driver')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Russell King <rmk+kernel@arm.linux.org.uk>
This commit is contained in:
Dan Carpenter 2016-01-04 16:10:24 +03:00 committed by Lucas Stach
parent c11b898963
commit ed94add00e
1 changed files with 4 additions and 2 deletions

View File

@ -305,8 +305,10 @@ int etnaviv_gem_get_iova(struct etnaviv_gpu *gpu,
mapping = etnaviv_gem_get_vram_mapping(etnaviv_obj, NULL);
if (!mapping) {
mapping = kzalloc(sizeof(*mapping), GFP_KERNEL);
if (!mapping)
return -ENOMEM;
if (!mapping) {
ret = -ENOMEM;
goto out;
}
INIT_LIST_HEAD(&mapping->scan_node);
mapping->object = etnaviv_obj;