mbox_request_channel() returning value was changed in case of error.
It uses returning value of of_parse_phandle_with_args().
It is returning with -ENOENT instead of -ENODEV when no mboxes property
exists.

Fixes: 24fdd5074b20 ("mailbox: use error ret code of 
of_parse_phandle_with_args()")
Signed-off-by: Barnabás Czémán <barnabas.cze...@mainlining.org>
---
 drivers/rpmsg/qcom_smd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/rpmsg/qcom_smd.c b/drivers/rpmsg/qcom_smd.c
index 
40d386809d6b78e209861c23d934e1b9fd743606..e552a9af578e48cfd854a228a4d91e4fa04bf29d
 100644
--- a/drivers/rpmsg/qcom_smd.c
+++ b/drivers/rpmsg/qcom_smd.c
@@ -1368,7 +1368,7 @@ static int qcom_smd_parse_edge(struct device *dev,
        edge->mbox_client.knows_txdone = true;
        edge->mbox_chan = mbox_request_channel(&edge->mbox_client, 0);
        if (IS_ERR(edge->mbox_chan)) {
-               if (PTR_ERR(edge->mbox_chan) != -ENODEV) {
+               if (PTR_ERR(edge->mbox_chan) != -ENOENT) {
                        ret = PTR_ERR(edge->mbox_chan);
                        goto put_node;
                }

-- 
2.49.0


Reply via email to