From 0cf08ca6a778ea1787f39661d218676ebea2256a Mon Sep 17 00:00:00 2001 From: "hyesoo.yu" Date: Thu, 6 Jul 2017 10:46:47 +0900 Subject: [PATCH] [COMMON] g2d: fix the error handling for fence The return value is fixed when error happens. Change-Id: I44d335b1412a0e2d8861a19edf6b3dffa8b38c91 Signed-off-by: hyesoo.yu --- drivers/gpu/exynos/g2d/g2d_uapi_process.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/exynos/g2d/g2d_uapi_process.c b/drivers/gpu/exynos/g2d/g2d_uapi_process.c index 6b180cbdf6bd..10e168a9250a 100644 --- a/drivers/gpu/exynos/g2d/g2d_uapi_process.c +++ b/drivers/gpu/exynos/g2d/g2d_uapi_process.c @@ -612,7 +612,7 @@ static int g2d_get_source(struct g2d_device *g2d_dev, struct g2d_task *task, if (IS_ERR(layer->fence)) { dev_err(dev, "%s: Invalid fence fd %d on source[%d]\n", __func__, data->fence, index); - return ret; + return PTR_ERR(layer->fence); } ret = g2d_get_buffer(g2d_dev, NULL, layer, data, DMA_TO_DEVICE); @@ -707,7 +707,7 @@ static int g2d_get_target(struct g2d_device *g2d_dev, struct g2d_context *ctx, if (IS_ERR(target->fence)) { dev_err(dev, "%s: Invalid fence fd %d on target\n", __func__, data->fence); - return ret; + return PTR_ERR(target->fence); } ret = g2d_get_buffer(g2d_dev, ctx, target, data, DMA_FROM_DEVICE); -- 2.20.1