aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJamie Gennis2013-02-19 20:49:20 -0600
committerArve Hjønnevåg2013-02-22 17:27:33 -0600
commit1b9a7bf534a41b6df8320f58ccb963488035882d (patch)
tree39fc771748b27d1baf4bd4181f10a3e2619c1c52
parent4686ad1c8f13a7a042783e420f9d5f359f7f4c95 (diff)
downloadkernel-common-1b9a7bf534a41b6df8320f58ccb963488035882d.tar.gz
kernel-common-1b9a7bf534a41b6df8320f58ccb963488035882d.tar.xz
kernel-common-1b9a7bf534a41b6df8320f58ccb963488035882d.zip
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)
615 return fence->status; 615 return fence->status;
616 } 616 }
617 617
618 if (fence->status == 0 && timeout > 0) { 618 if (fence->status == 0) {
619 pr_info("fence timeout on [%p] after %dms\n", fence, 619 if (timeout > 0) {
620 jiffies_to_msecs(timeout)); 620 pr_info("fence timeout on [%p] after %dms\n", fence,
621 sync_dump(); 621 jiffies_to_msecs(timeout));
622 sync_dump();
623 }
622 return -ETIME; 624 return -ETIME;
623 } 625 }
624 626