summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Agner <stefan.agner@toradex.com>2017-11-23 11:09:15 +0100
committerMarcel Ziswiler <marcel.ziswiler@toradex.com>2017-12-21 14:28:32 +0100
commit22adfeb5967dc794da4bec42abad708328ff4ca2 (patch)
tree2d0904de19599ea507daf9dbe11dfe6c1cc85689
parent7752c8ab685134ffb44b0bfb5da966d22b147201 (diff)
rpmsg: imx: return ENOTTY if no tty connected
Return ENOTTY if no reader is using the TTY. Note that the VirtIO transport used by RPmsg currently does not use the return value of this callback, hence currently will not influence operation in any way. Signed-off-by: Stefan Agner <stefan.agner@toradex.com> Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
-rw-r--r--drivers/rpmsg/imx_rpmsg_tty.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/rpmsg/imx_rpmsg_tty.c b/drivers/rpmsg/imx_rpmsg_tty.c
index 9f99eded3361..22a2ff1b5338 100644
--- a/drivers/rpmsg/imx_rpmsg_tty.c
+++ b/drivers/rpmsg/imx_rpmsg_tty.c
@@ -49,7 +49,7 @@ static int rpmsg_tty_cb(struct rpmsg_device *rpdev, void *data, int len,
if (tty == NULL) {
dev_dbg(&rpdev->dev, "waiting for readers, discard len %d\n",
len);
- return;
+ return -ENOTTY;
}
/* flush the recv-ed none-zero data to tty node */