diff options
| -rw-r--r-- | net/9p/mux.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/net/9p/mux.c b/net/9p/mux.c index c3aa87bc8b97..acb038810f39 100644 --- a/net/9p/mux.c +++ b/net/9p/mux.c | |||
| @@ -505,8 +505,12 @@ again: | |||
| 505 | return; | 505 | return; |
| 506 | } | 506 | } |
| 507 | 507 | ||
| 508 | if (err <= 0) | 508 | if (err < 0) |
| 509 | goto error; | ||
| 510 | else if (err == 0) { | ||
| 511 | err = -EREMOTEIO; | ||
| 509 | goto error; | 512 | goto error; |
| 513 | } | ||
| 510 | 514 | ||
| 511 | m->wpos += err; | 515 | m->wpos += err; |
| 512 | if (m->wpos == m->wsize) | 516 | if (m->wpos == m->wsize) |
