summaryrefslogtreecommitdiffstats
path: root/net/9p
diff options
context:
space:
mode:
Diffstat (limited to 'net/9p')
-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 c3aa87bc8b9..acb038810f3 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)