diff options
author | Bjorn Andersson <bjorn.andersson@linaro.org> | 2016-12-01 19:59:55 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-01-12 05:39:31 -0500 |
commit | 17df3e74fb5174bc9fc078fd640dc3b2762f0ca1 (patch) | |
tree | 04db33f553c478df2134aa1d887049517a92164b | |
parent | 1d8286ccbcc6f2f5abca386430825e4c3983edc7 (diff) |
rpmsg: qcom_smd: Correct return value for O_NONBLOCK
commit 1d74e7ed5dc1903ac081574a9b6aa94e7ba4ad45 upstream.
qcom_smd_send() should return -EAGAIN for non-blocking channels with
insufficient space, so that we can propagate this event to user space.
Fixes: 53e2822e56c7 ("rpmsg: Introduce Qualcomm SMD backend")
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/rpmsg/qcom_smd.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/rpmsg/qcom_smd.c b/drivers/rpmsg/qcom_smd.c index 06fef2b4c814..1d4770c02e57 100644 --- a/drivers/rpmsg/qcom_smd.c +++ b/drivers/rpmsg/qcom_smd.c | |||
@@ -739,7 +739,7 @@ static int __qcom_smd_send(struct qcom_smd_channel *channel, const void *data, | |||
739 | 739 | ||
740 | while (qcom_smd_get_tx_avail(channel) < tlen) { | 740 | while (qcom_smd_get_tx_avail(channel) < tlen) { |
741 | if (!wait) { | 741 | if (!wait) { |
742 | ret = -ENOMEM; | 742 | ret = -EAGAIN; |
743 | goto out; | 743 | goto out; |
744 | } | 744 | } |
745 | 745 | ||