summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/etnaviv/etnaviv_dump.c
diff options
context:
space:
mode:
authorLucas Stach <l.stach@pengutronix.de>2016-01-25 15:37:28 +0100
committerLucas Stach <l.stach@pengutronix.de>2016-01-26 18:54:00 +0100
commit9f07bb0d4ada68f05b2e51c10720d4688e6adea4 (patch)
tree85cccf618bffa4a1680902ee0b004714d7591f81 /drivers/gpu/drm/etnaviv/etnaviv_dump.c
parentdrm/etnaviv: fix memory leak in IOMMU init path (diff)
downloadlinux-9f07bb0d4ada68f05b2e51c10720d4688e6adea4.tar.xz
linux-9f07bb0d4ada68f05b2e51c10720d4688e6adea4.zip
drm/etnaviv: fix get pages error path in etnaviv_gem_vaddr
In case that etnaviv_gem_get_pages is unable to get the required pages the object mutex needs to be unlocked. Also return NULL in this case instead of propagating the error, as callers of this function might not be prepared to handle a pointer error, but expect this call to follow the semantics of a plain vmap to return NULL in case of an error. Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Diffstat (limited to 'drivers/gpu/drm/etnaviv/etnaviv_dump.c')
-rw-r--r--drivers/gpu/drm/etnaviv/etnaviv_dump.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/etnaviv/etnaviv_dump.c b/drivers/gpu/drm/etnaviv/etnaviv_dump.c
index fd7d3e989e79..09a759e69dd2 100644
--- a/drivers/gpu/drm/etnaviv/etnaviv_dump.c
+++ b/drivers/gpu/drm/etnaviv/etnaviv_dump.c
@@ -216,7 +216,7 @@ void etnaviv_core_dump(struct etnaviv_gpu *gpu)
iter.hdr->iova = cpu_to_le64(vram->iova);
vaddr = etnaviv_gem_vaddr(&obj->base);
- if (vaddr && !IS_ERR(vaddr))
+ if (vaddr)
memcpy(iter.data, vaddr, obj->base.size);
etnaviv_core_dump_header(&iter, ETDUMP_BUF_BO, iter.data +