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
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 <[email protected]>
Signed-off-by: Jia-Ju Bai <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Bjorn Andersson <[email protected]>
  • Loading branch information
XidianGeneral authored and andersson committed Apr 9, 2021
1 parent 964e8be commit 26594c6
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 26594c6

Please sign in to comment.