]> git.baikalelectronics.ru Git - kernel.git/commitdiff
mailbox: Stop using ENOSYS for anything other than unimplemented syscalls
authorLee Jones <lee.jones@linaro.org>
Wed, 23 Mar 2016 14:43:43 +0000 (14:43 +0000)
committerJassi Brar <jaswinder.singh@linaro.org>
Tue, 12 Apr 2016 07:58:32 +0000 (13:28 +0530)
In accordance with e15f431fe2d5 ("errno.h: Improve ENOSYS's comment") and
91c9afaf97ee ("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>
drivers/mailbox/mailbox.c

index 6a4811f857056aaa64baff75265902b59be12ac9..4a36632c236f09ad9cdde06ff213961c712c3000 100644 (file)
@@ -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) {