diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2016-12-13 19:52:45 +0300 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-12-13 19:52:45 +0300 |
commit | 961288108e26e5024801c75d0e7c8e9a2de2b02b (patch) | |
tree | b8d592220397b05744e196a345d9e8ff30cbc1ad /drivers/rpmsg/qcom_smd.c | |
parent | edc57ea92cb838e1d04529cb9002097ad6da8a4b (diff) | |
parent | 5c8a934349ee61027a48e3e6c0bba2b7d3dd09d1 (diff) | |
download | linux-961288108e26e5024801c75d0e7c8e9a2de2b02b.tar.xz |
Merge tag 'rpmsg-v4.10' of git://github.com/andersson/remoteproc
Pull rpmsg updates from Bjorn Andersson:
"Argument validation in public functions, function stubs for
COMPILE_TEST-ing clients, preparation for exposing rpmsg endponts
to user space and minor Qualcomm SMD fixes"
* tag 'rpmsg-v4.10' of git://github.com/andersson/remoteproc:
dt-binding: soc: qcom: smd: Add label property
rpmsg: qcom_smd: Correct return value for O_NONBLOCK
rpmsg: Provide function stubs for API
rpmsg: Handle invalid parameters in public API
rpmsg: Support drivers without primary endpoint
rpmsg: Introduce a driver override mechanism
rpmsg: smd: Reduce restrictions when finding channel
Diffstat (limited to 'drivers/rpmsg/qcom_smd.c')
-rw-r--r-- | drivers/rpmsg/qcom_smd.c | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/drivers/rpmsg/qcom_smd.c b/drivers/rpmsg/qcom_smd.c index 394a1b52e471..0fae48116a0d 100644 --- a/drivers/rpmsg/qcom_smd.c +++ b/drivers/rpmsg/qcom_smd.c @@ -740,7 +740,7 @@ static int __qcom_smd_send(struct qcom_smd_channel *channel, const void *data, while (qcom_smd_get_tx_avail(channel) < tlen) { if (!wait) { - ret = -ENOMEM; + ret = -EAGAIN; goto out; } @@ -821,20 +821,13 @@ qcom_smd_find_channel(struct qcom_smd_edge *edge, const char *name) struct qcom_smd_channel *channel; struct qcom_smd_channel *ret = NULL; unsigned long flags; - unsigned state; spin_lock_irqsave(&edge->channels_lock, flags); list_for_each_entry(channel, &edge->channels, list) { - if (strcmp(channel->name, name)) - continue; - - state = GET_RX_CHANNEL_INFO(channel, state); - if (state != SMD_CHANNEL_OPENING && - state != SMD_CHANNEL_OPENED) - continue; - - ret = channel; - break; + if (!strcmp(channel->name, name)) { + ret = channel; + break; + } } spin_unlock_irqrestore(&edge->channels_lock, flags); |