summaryrefslogtreecommitdiff
path: root/drivers/rpmsg
diff options
context:
space:
mode:
authorStefan Agner <stefan.agner@toradex.com>2017-11-23 11:09:15 +0100
committerMarcel Ziswiler <marcel.ziswiler@toradex.com>2020-02-09 22:45:36 +0100
commitc20decaa5188b2171832dd393d2b4c338219a592 (patch)
treeda6fc79fdd1e6a6cadbb42587f6d7341ce234a6d /drivers/rpmsg
parent3ffe7a91e70eb12de06c19a6f98acbc11da081bf (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>
Diffstat (limited to 'drivers/rpmsg')
-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 fd1750a00677..e6d8c42f7c16 100644
--- a/drivers/rpmsg/imx_rpmsg_tty.c
+++ b/drivers/rpmsg/imx_rpmsg_tty.c
@@ -48,7 +48,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 */