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:
parent
c11b898963
commit
ed94add00e
|
@ -305,8 +305,10 @@ int etnaviv_gem_get_iova(struct etnaviv_gpu *gpu,
|
||||||
mapping = etnaviv_gem_get_vram_mapping(etnaviv_obj, NULL);
|
mapping = etnaviv_gem_get_vram_mapping(etnaviv_obj, NULL);
|
||||||
if (!mapping) {
|
if (!mapping) {
|
||||||
mapping = kzalloc(sizeof(*mapping), GFP_KERNEL);
|
mapping = kzalloc(sizeof(*mapping), GFP_KERNEL);
|
||||||
if (!mapping)
|
if (!mapping) {
|
||||||
return -ENOMEM;
|
ret = -ENOMEM;
|
||||||
|
goto out;
|
||||||
|
}
|
||||||
|
|
||||||
INIT_LIST_HEAD(&mapping->scan_node);
|
INIT_LIST_HEAD(&mapping->scan_node);
|
||||||
mapping->object = etnaviv_obj;
|
mapping->object = etnaviv_obj;
|
||||||
|
|
Loading…
Reference in New Issue