From 7f6da2143cb0d7c2ad6d656430f1b50eaa7af405 Mon Sep 17 00:00:00 2001 From: Jamie Gennis Date: Tue, 19 Feb 2013 18:49:20 -0800 Subject: [PATCH] sync: fix timeout = 0 wait behavior Change-Id: I8b9254e92c26d9f44abbc0c77fb44624de947013 Signed-off-by: Jamie Gennis --- drivers/base/sync.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/drivers/base/sync.c b/drivers/base/sync.c index f35a975297f4..ec3b0fa3d742 100644 --- a/drivers/base/sync.c +++ b/drivers/base/sync.c @@ -615,10 +615,12 @@ int sync_fence_wait(struct sync_fence *fence, long timeout) return fence->status; } - if (fence->status == 0 && timeout > 0) { - pr_info("fence timeout on [%p] after %dms\n", fence, - jiffies_to_msecs(timeout)); - sync_dump(); + if (fence->status == 0) { + if (timeout > 0) { + pr_info("fence timeout on [%p] after %dms\n", fence, + jiffies_to_msecs(timeout)); + sync_dump(); + } return -ETIME; } -- 2.34.1