aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/um/drivers/chan_kern.c5
-rw-r--r--arch/um/drivers/line.c2
2 files changed, 2 insertions, 5 deletions
diff --git a/arch/um/drivers/chan_kern.c b/arch/um/drivers/chan_kern.c
index b760b5a2a3435..1f77deb3fd237 100644
--- a/arch/um/drivers/chan_kern.c
+++ b/arch/um/drivers/chan_kern.c
@@ -248,11 +248,8 @@ int write_chan(struct list_head *chans, const char *buf, int len,
n = chan->ops->write(chan->fd, buf, len, chan->data);
if (chan->primary) {
ret = n;
- if ((ret == -EAGAIN) || ((ret >= 0) && (ret < len))){
+ if ((ret == -EAGAIN) || ((ret >= 0) && (ret < len)))
reactivate_fd(chan->fd, write_irq);
- if (ret == -EAGAIN)
- ret = 0;
- }
}
}
return(ret);
diff --git a/arch/um/drivers/line.c b/arch/um/drivers/line.c
index d4286de17f070..6924f273ced9f 100644
--- a/arch/um/drivers/line.c
+++ b/arch/um/drivers/line.c
@@ -128,7 +128,7 @@ int line_write(struct tty_struct *tty, const unsigned char *buf, int len)
ret = buffer_data(line, buf, len);
err = flush_buffer(line);
local_irq_restore(flags);
- if(err <= 0)
+ if(err <= 0 && (err != -EAGAIN || !ret))
ret = err;
}
else {