From: Jamie Gennis Date: Wed, 20 Feb 2013 02:49:20 +0000 (-0800) Subject: sync: fix timeout = 0 wait behavior X-Git-Tag: firefly_0821_release~7548 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=7f6da2143cb0d7c2ad6d656430f1b50eaa7af405;p=firefly-linux-kernel-4.4.55.git sync: fix timeout = 0 wait behavior Change-Id: I8b9254e92c26d9f44abbc0c77fb44624de947013 Signed-off-by: Jamie Gennis --- 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; }