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>
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;