From e940acc36b9fe5b5cf47606c8644ae80e101895a Mon Sep 17 00:00:00 2001 From: Jeremy Gebben Date: Fri, 27 Feb 2015 11:32:29 -0700 Subject: [PATCH] msm: kgsl: fix sync file error handling Reorder our sync_fence_install() calls to happen after all possible failures so that error cleanup will be correct. CRs-Fixed: 1081855 Change-Id: I0e7bb459f2acc010446ac5e5b3b72c8b16cce079 Signed-off-by: Jeremy Gebben Signed-off-by: Sudeep Yedalapure --- drivers/gpu/msm/kgsl_sync.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/msm/kgsl_sync.c b/drivers/gpu/msm/kgsl_sync.c index 0747939f525..d10429d38dd 100644 --- a/drivers/gpu/msm/kgsl_sync.c +++ b/drivers/gpu/msm/kgsl_sync.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2012-2014, The Linux Foundation. All rights reserved. +/* Copyright (c) 2012-2014,2016, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -194,7 +194,6 @@ int kgsl_add_fence_event(struct kgsl_device *device, ret = priv.fence_fd; goto unlock; } - sync_fence_install(fence, priv.fence_fd); /* * If the timestamp hasn't expired yet create an event to trigger it. @@ -221,6 +220,7 @@ int kgsl_add_fence_event(struct kgsl_device *device, ret = -EFAULT; goto out; } + sync_fence_install(fence, priv.fence_fd); return 0;