diff options
author | Stefan Agner <stefan.agner@toradex.com> | 2017-11-23 11:09:15 +0100 |
---|---|---|
committer | Marcel Ziswiler <marcel.ziswiler@toradex.com> | 2018-12-24 01:27:30 +0100 |
commit | d54ff0d73c8dabc52688f3522106cfeb1b62eb36 (patch) | |
tree | 4d1678ba9387a4423544dfd2a67c56148b3f56cd /drivers | |
parent | 603af7fa5801450679f19f14933ddbd8413600d1 (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')
-rw-r--r-- | drivers/rpmsg/imx_rpmsg_tty.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/rpmsg/imx_rpmsg_tty.c b/drivers/rpmsg/imx_rpmsg_tty.c index ab71195ddb83..53a132fb4c27 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 */ |