Browse Source

Merge commit '65bee71' into update_old_avalon_20130513

Luke Dashjr 13 years ago
parent
commit
0423a77817
1 changed files with 2 additions and 2 deletions
  1. 2 2
      driver-avalon.c

+ 2 - 2
driver-avalon.c

@@ -222,13 +222,13 @@ static int avalon_gets(int fd, uint8_t *buf, int read_count,
 			ret = read(fd, buf, read_amount);
 			if (unlikely(ret < 0))
 				return AVA_GETS_ERROR;
-			if (ret >= read_amount)
-				return AVA_GETS_OK;
 			if (first) {
 				if (tv_finish)
 					gettimeofday(tv_finish, NULL);
 				first = false;
 			}
+			if (ret >= read_amount)
+				return AVA_GETS_OK;
 			buf += ret;
 			read_amount -= ret;
 			continue;