sync: fix timeout = 0 wait behavior
authorJamie Gennis <jgennis@google.com>
Wed, 20 Feb 2013 02:49:20 +0000 (18:49 -0800)
committer黄涛 <huangtao@rock-chips.com>
Fri, 22 Feb 2013 09:47:23 +0000 (17:47 +0800)
Change-Id: I8b9254e92c26d9f44abbc0c77fb44624de947013
Signed-off-by: Jamie Gennis <jgennis@google.com>
drivers/base/sync.c

index f35a975297f43723ebc4f03745fcb5ce88568ab0..ec3b0fa3d742f05127fc13cdc2f8a26db4160b3c 100644 (file)
@@ -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;
        }