From: Jerome Brunet Date: Fri, 1 Dec 2017 21:51:51 +0000 (+0100) Subject: clk: fix incorrect usage of ENOSYS X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=56e7ceddbeb812a6f79f37523eb4e6e4620f4416;p=linux.git clk: fix incorrect usage of ENOSYS 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 Tested-by: Quentin Schulz Tested-by: Maxime Ripard Acked-by: Michael Turquette Signed-off-by: Jerome Brunet Signed-off-by: Michael Turquette Link: lkml.kernel.org/r/20171201215200.23523-2-jbrunet@baylibre.com --- diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c index 647d056df88c8..5fe9e63b15c65 100644 --- a/drivers/clk/clk.c +++ b/drivers/clk/clk.c @@ -1888,7 +1888,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; }