diff options
Diffstat (limited to 'net')
-rw-r--r-- | net/9p/client.c | 7 | ||||
-rw-r--r-- | net/9p/error.c | 2 |
2 files changed, 2 insertions, 7 deletions
diff --git a/net/9p/client.c b/net/9p/client.c index 7bbd2d5ae8d3..5bf5f227dbe0 100644 --- a/net/9p/client.c +++ b/net/9p/client.c | |||
@@ -411,14 +411,9 @@ static int p9_check_errors(struct p9_client *c, struct p9_req_t *req) | |||
411 | if (c->dotu) | 411 | if (c->dotu) |
412 | err = -ecode; | 412 | err = -ecode; |
413 | 413 | ||
414 | if (!err) { | 414 | if (!err || !IS_ERR_VALUE(err)) |
415 | err = p9_errstr2errno(ename, strlen(ename)); | 415 | err = p9_errstr2errno(ename, strlen(ename)); |
416 | 416 | ||
417 | /* string match failed */ | ||
418 | if (!err) | ||
419 | err = -ESERVERFAULT; | ||
420 | } | ||
421 | |||
422 | P9_DPRINTK(P9_DEBUG_9P, "<<< RERROR (%d) %s\n", -ecode, ename); | 417 | P9_DPRINTK(P9_DEBUG_9P, "<<< RERROR (%d) %s\n", -ecode, ename); |
423 | 418 | ||
424 | kfree(ename); | 419 | kfree(ename); |
diff --git a/net/9p/error.c b/net/9p/error.c index fdebe4314062..52518512a93e 100644 --- a/net/9p/error.c +++ b/net/9p/error.c | |||
@@ -239,7 +239,7 @@ int p9_errstr2errno(char *errstr, int len) | |||
239 | errstr[len] = 0; | 239 | errstr[len] = 0; |
240 | printk(KERN_ERR "%s: server reported unknown error %s\n", | 240 | printk(KERN_ERR "%s: server reported unknown error %s\n", |
241 | __func__, errstr); | 241 | __func__, errstr); |
242 | errno = 1; | 242 | errno = ESERVERFAULT; |
243 | } | 243 | } |
244 | 244 | ||
245 | return -errno; | 245 | return -errno; |