aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVidhoon Viswanathan <vidhoon@ti.com>2012-05-02 12:34:19 -0700
committerZiyan <jaraidaniel@gmail.com>2015-05-01 18:28:24 +0200
commit26c539bfccf6be987fbdbcecc059a69e08c75890 (patch)
tree538f62fd825bf366cb806ae0c264bd9dcef64c3b
parent04e1c8a81a951302bc9f3573e9c9498664cfa5b5 (diff)
downloadkernel_samsung_tuna-26c539bfccf6be987fbdbcecc059a69e08c75890.zip
kernel_samsung_tuna-26c539bfccf6be987fbdbcecc059a69e08c75890.tar.gz
kernel_samsung_tuna-26c539bfccf6be987fbdbcecc059a69e08c75890.tar.bz2
rpmsg: omx: return ENXIO in rpmsg_omx_write
rpmsg: omx: return ENXIO in rpmsg_omx_write The error code, ENXIO is used in rpmsg_omx driver to indicate a terminal error on the remote processor side. This status is maintained during the recovery of the remote processor, while the cdev gets reinitialized/recreated. The rpmsg_omx's write file operation is currently not returning this error. This has been added now to have it behave in the same way as the read file operation. Change-Id: I61d6e6c07aa39208d913da622ed32d809c51d409 Signed-off-by: Vidhoon Viswanathan <vidhoon@ti.com> Signed-off-by: Suman Anna <s-anna@ti.com>
-rw-r--r--drivers/rpmsg/rpmsg_omx.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/rpmsg/rpmsg_omx.c b/drivers/rpmsg/rpmsg_omx.c
index 22d81b2..ee7d5bb 100644
--- a/drivers/rpmsg/rpmsg_omx.c
+++ b/drivers/rpmsg/rpmsg_omx.c
@@ -598,6 +598,9 @@ static ssize_t rpmsg_omx_write(struct file *filp, const char __user *ubuf,
struct omx_msg_hdr *hdr = (struct omx_msg_hdr *) kbuf;
int use, ret;
+ if (omx->state == OMX_FAIL)
+ return -ENXIO;
+
if (omx->state != OMX_CONNECTED)
return -ENOTCONN;