Browse Source

gc3355: Return bytes read to distinguish 0 bytes from error

Nate Woolls 11 years ago
parent
commit
aefc83fe58
1 changed files with 1 additions and 1 deletions
  1. 1 1
      gc3355.c

+ 1 - 1
gc3355.c

@@ -403,7 +403,7 @@ int gc3355_read(int fd, char *buf, size_t size)
 	}
 	
 	if (unlikely(tries == 0))
-		return -1;
+		return read;
 	
 	if ((read > 0) && opt_dev_protocol)
 		gc3355_log_protocol(fd, buf, read, "RECV");