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)