From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753188AbdIXUCl (ORCPT ); Sun, 24 Sep 2017 16:02:41 -0400 Received: from mail-wm0-f44.google.com ([74.125.82.44]:46582 "EHLO mail-wm0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752872AbdIXUAi (ORCPT ); Sun, 24 Sep 2017 16:00:38 -0400 X-Google-Smtp-Source: AOwi7QCBUTBQDULfoLqpOEHhcSY3wIgA5dAkhQz1C6l6n+d9WozkWCB00ZRW3V9Zbt14oq/rw3H9sA== From: Jerome Brunet To: Stephen Boyd , Michael Turquette Cc: Jerome Brunet , linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, Russell King , Linus Walleij , Quentin Schulz , Kevin Hilman Subject: [PATCH v4 01/10] clk: fix incorrect usage of ENOSYS Date: Sun, 24 Sep 2017 22:00:21 +0200 Message-Id: <20170924200030.6227-2-jbrunet@baylibre.com> X-Mailer: git-send-email 2.13.5 In-Reply-To: <20170924200030.6227-1-jbrunet@baylibre.com> References: <20170924200030.6227-1-jbrunet@baylibre.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 Signed-off-by: Jerome Brunet --- 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