diff options
author | Jia-Ju Bai <baijiaju1990@gmail.com> | 2021-03-06 14:36:24 +0100 |
---|---|---|
committer | Bjorn Andersson <bjorn.andersson@linaro.org> | 2021-04-09 18:08:42 +0200 |
commit | 26594c6bbb60c6bc87e3762a86ceece57d164c66 (patch) | |
tree | 1c216ffa6b39701431e2339715c73b55437c50ff /drivers/rpmsg | |
parent | rpmsg: char: Return an error if device already open (diff) | |
download | linux-26594c6bbb60c6bc87e3762a86ceece57d164c66.tar.xz linux-26594c6bbb60c6bc87e3762a86ceece57d164c66.zip |
rpmsg: qcom_glink_native: fix error return code of qcom_glink_rx_data()
When idr_find() returns NULL to intent, no error return code of
qcom_glink_rx_data() is assigned.
To fix this bug, ret is assigned with -ENOENT in this case.
Fixes: 64f95f87920d ("rpmsg: glink: Use the local intents when receiving data")
Reported-by: TOTE Robot <oslab@tsinghua.edu.cn>
Signed-off-by: Jia-Ju Bai <baijiaju1990@gmail.com>
Link: https://lore.kernel.org/r/20210306133624.17237-1-baijiaju1990@gmail.com
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Diffstat (limited to 'drivers/rpmsg')
-rw-r--r-- | drivers/rpmsg/qcom_glink_native.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/rpmsg/qcom_glink_native.c b/drivers/rpmsg/qcom_glink_native.c index edae0c9a8236..05533c71b10e 100644 --- a/drivers/rpmsg/qcom_glink_native.c +++ b/drivers/rpmsg/qcom_glink_native.c @@ -857,6 +857,7 @@ static int qcom_glink_rx_data(struct qcom_glink *glink, size_t avail) dev_err(glink->dev, "no intent found for channel %s intent %d", channel->name, liid); + ret = -ENOENT; goto advance_rx; } } |