Commit ed94add0 authored by Dan Carpenter's avatar Dan Carpenter Committed by Lucas Stach

drm/etnaviv: unlock on error in etnaviv_gem_get_iova()

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

Fixes: a8c21a54 ('drm/etnaviv: add initial etnaviv DRM driver')
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Acked-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
parent c11b8989
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment