Skip to content

Commit

Permalink
rpmsg: qcom_glink_native: fix error return code of qcom_glink_rx_data()
Browse files Browse the repository at this point in the history
[ Upstream commit 26594c6 ]

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: 64f95f8 ("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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
XidianGeneral authored and gregkh committed May 19, 2021
1 parent 058b7d4 commit de68b23
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/rpmsg/qcom_glink_native.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand Down

0 comments on commit de68b23

Please sign in to comment.