aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJamie Gennis <jgennis@google.com>2013-02-19 18:49:20 -0800
committerArve Hjønnevåg <arve@android.com>2013-04-29 14:43:21 -0700
commit3f06c4fa1c3a251e4d0d9ec0e4ec57b50fc3522d (patch)
tree37ead6fff950ca63a12adacd7e9ac19c30e8ee99
parent8d219155c9bea45c237648910257ccf2b1e5df48 (diff)
downloadvexpress-lsk-3f06c4fa1c3a251e4d0d9ec0e4ec57b50fc3522d.tar.gz
sync: fix timeout = 0 wait behavior
Change-Id: I8b9254e92c26d9f44abbc0c77fb44624de947013 Signed-off-by: Jamie Gennis <jgennis@google.com>
-rw-r--r--drivers/base/sync.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/base/sync.c b/drivers/base/sync.c
index 8679596bb92..2e359968919 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;
}