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>2018-12-09 23:11:17 +0100
commit0261d80b975090cc6f4bf28d0760201ecc2cdba5 (patch)
treeed0a182071f78a87369afd6a3320ad43b6fa6a6a
parent7d56f2beef16f7e531260b99d62bc28527728bc2 (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 */