diff options
author | Peng Fan <peng.fan@nxp.com> | 2025-04-11 16:14:11 +0300 |
---|---|---|
committer | Jassi Brar <jassisinghbrar@gmail.com> | 2025-05-27 00:23:39 +0300 |
commit | cb7e2ec3706f7ddedde2504b1b4342046c9a92e3 (patch) | |
tree | 63e38f20eeca0be92f75643b211b11af2c011390 | |
parent | dddbd233e67e792bb0a3f9694a4707e6be29b2c6 (diff) | |
download | linux-cb7e2ec3706f7ddedde2504b1b4342046c9a92e3.tar.xz |
mailbox: Propagate correct error return value
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@nxp.com>
Signed-off-by: Jassi Brar <jassisinghbrar@gmail.com>
-rw-r--r-- | drivers/mailbox/mailbox.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mailbox/mailbox.c b/drivers/mailbox/mailbox.c index 3ecf92a580fe..3a58dc56f015 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); } |