Skip to content

Commit

Permalink
mailbox: Stop using ENOSYS for anything other than unimplemented sysc…
Browse files Browse the repository at this point in the history
…alls

In accordance with e15f431 ("errno.h: Improve ENOSYS's comment") and
91c9afa ("checkpatch.pl: new instances of ENOSYS are errors") we're
converting from the old meaning of: ENOSYS "Function not implemented" to
a more standard EINVAL.

Reported-by: Seraphin Bonnaffe <seraphin.bonnaffe@st.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>
  • Loading branch information
Lee Jones authored and Jassi Brar committed Apr 12, 2016
1 parent d1c2f87 commit 0c44d78
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/mailbox/mailbox.c
Original file line number Diff line number Diff line change
Expand Up @@ -375,13 +375,13 @@ struct mbox_chan *mbox_request_channel_byname(struct mbox_client *cl,

if (!np) {
dev_err(cl->dev, "%s() currently only supports DT\n", __func__);
return ERR_PTR(-ENOSYS);
return ERR_PTR(-EINVAL);
}

if (!of_get_property(np, "mbox-names", NULL)) {
dev_err(cl->dev,
"%s() requires an \"mbox-names\" property\n", __func__);
return ERR_PTR(-ENOSYS);
return ERR_PTR(-EINVAL);
}

of_property_for_each_string(np, "mbox-names", prop, mbox_name) {
Expand Down

0 comments on commit 0c44d78

Please sign in to comment.