summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
Diffstat (limited to 'net')
-rw-r--r--net/9p/mux.c6
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:
return;
}
- if (err <= 0)
+ if (err < 0)
+ goto error;
+ else if (err == 0) {
+ err = -EREMOTEIO;
goto error;
+ }
m->wpos += err;
if (m->wpos == m->wsize)