diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2016-01-04 16:10:24 +0300 |
---|---|---|
committer | Lucas Stach <l.stach@pengutronix.de> | 2016-01-06 12:13:45 +0100 |
commit | ed94add00e290e675c36cef6767d7d1f51a02f28 (patch) | |
tree | d6351737e309f12a6ec9dc33b4af8b886f41dd5d /drivers/gpu/drm/etnaviv/etnaviv_gem.c | |
parent | c11b8989635166c5a1e6aac1853a847bd664f8db (diff) | |
download | talos-obmc-linux-ed94add00e290e675c36cef6767d7d1f51a02f28.tar.gz talos-obmc-linux-ed94add00e290e675c36cef6767d7d1f51a02f28.zip |
drm/etnaviv: unlock on error in etnaviv_gem_get_iova()
We have to drop a lock before returning -ENOMEM here.
Fixes: a8c21a5451d8 ('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>
Diffstat (limited to 'drivers/gpu/drm/etnaviv/etnaviv_gem.c')
-rw-r--r-- | drivers/gpu/drm/etnaviv/etnaviv_gem.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/gpu/drm/etnaviv/etnaviv_gem.c b/drivers/gpu/drm/etnaviv/etnaviv_gem.c index 8d6f859f8200..9f77c3b94cc6 100644 --- a/drivers/gpu/drm/etnaviv/etnaviv_gem.c +++ b/drivers/gpu/drm/etnaviv/etnaviv_gem.c @@ -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; |