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/soc/qcom/smp2p.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/soc/qcom/smp2p.c b/drivers/soc/qcom/smp2p.c
index 
a3e88ced328a91f1eb9dbaaaeb12fc901838bdaa..c9199d6fbe26ecc5ce941cfd608ebf1381be0935
 100644
--- a/drivers/soc/qcom/smp2p.c
+++ b/drivers/soc/qcom/smp2p.c
@@ -575,7 +575,7 @@ static int qcom_smp2p_probe(struct platform_device *pdev)
        smp2p->mbox_client.knows_txdone = true;
        smp2p->mbox_chan = mbox_request_channel(&smp2p->mbox_client, 0);
        if (IS_ERR(smp2p->mbox_chan)) {
-               if (PTR_ERR(smp2p->mbox_chan) != -ENODEV)
+               if (PTR_ERR(smp2p->mbox_chan) != -ENOENT)
                        return PTR_ERR(smp2p->mbox_chan);
 
                smp2p->mbox_chan = NULL;

-- 
2.49.0


Reply via email to