ENOSYS is special and should only be used for incorrect syscall number.
It does not seem to be the case here.

Reported by checkpatch.pl while working on clock protection.

Acked-by: Linus Walleij <[email protected]>
Tested-by: Quentin Schulz <[email protected]>
Signed-off-by: Jerome Brunet <[email protected]>
---
 drivers/clk/clk.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c
index c8d83acda006..b31e56b09e25 100644
--- a/drivers/clk/clk.c
+++ b/drivers/clk/clk.c
@@ -1804,7 +1804,7 @@ static int clk_core_set_parent(struct clk_core *core, 
struct clk_core *parent)
 
        /* verify ops for for multi-parent clks */
        if ((core->num_parents > 1) && (!core->ops->set_parent)) {
-               ret = -ENOSYS;
+               ret = -EPERM;
                goto out;
        }
 
-- 
2.13.5

Reply via email to