[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250411-mailbox-cleanup-v1-3-8db541394dc2@nxp.com>
Date: Fri, 11 Apr 2025 21:14:11 +0800
From: "Peng Fan (OSS)" <peng.fan@....nxp.com>
To: Jassi Brar <jassisinghbrar@...il.com>
Cc: Tudor Ambarus <tudor.ambarus@...aro.org>,
Elliot Berman <quic_eberman@...cinc.com>,
Thierry Reding <treding@...dia.com>, Sudeep Holla <sudeep.holla@....com>,
linux-kernel@...r.kernel.org, mailbox@...ts.linux.dev,
Peng Fan <peng.fan@....com>
Subject: [PATCH 3/6] mailbox: Propagate correct error return value
From: Peng Fan <peng.fan@....com>
In case of_property_match_string fails, it makes more sense
to return its error value to caller, not force the value to
ERR_PTR(-EINVAL).
Signed-off-by: Peng Fan <peng.fan@....com>
---
drivers/mailbox/mailbox.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/mailbox/mailbox.c b/drivers/mailbox/mailbox.c
index 3ecf92a580fef031d8add5e4c2e4df494a34010a..3a58dc56f015b0bf0ebc7551713af38c16439e11 100644
--- a/drivers/mailbox/mailbox.c
+++ b/drivers/mailbox/mailbox.c
@@ -458,7 +458,7 @@ struct mbox_chan *mbox_request_channel_byname(struct mbox_client *cl,
if (index < 0) {
dev_err(cl->dev, "%s() could not locate channel named \"%s\"\n",
__func__, name);
- return ERR_PTR(-EINVAL);
+ return ERR_PTR(index);
}
return mbox_request_channel(cl, index);
}
--
2.37.1
Powered by blists - more mailing lists