From patchwork Sun Dec 13 14:25:03 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tariq Toukan X-Patchwork-Id: 11970807 X-Patchwork-Delegate: mkubecek+ethtool@suse.cz Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id AA672C433FE for ; Sun, 13 Dec 2020 14:25:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6F81322D2C for ; Sun, 13 Dec 2020 14:25:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729710AbgLMOZ4 (ORCPT ); Sun, 13 Dec 2020 09:25:56 -0500 Received: from mail-il-dmz.mellanox.com ([193.47.165.129]:56704 "EHLO mellanox.co.il" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729036AbgLMOZ4 (ORCPT ); Sun, 13 Dec 2020 09:25:56 -0500 Received: from Internal Mail-Server by MTLPINE1 (envelope-from tariqt@nvidia.com) with SMTP; 13 Dec 2020 16:25:08 +0200 Received: from dev-l-vrt-206-005.mtl.labs.mlnx (dev-l-vrt-206-005.mtl.labs.mlnx [10.234.206.5]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id 0BDEP8u1013765; Sun, 13 Dec 2020 16:25:08 +0200 From: Tariq Toukan To: "John W . Linville" Cc: netdev@vger.kernel.org, Roy Novich , Tariq Toukan Subject: [PATCH ethtool] ethtool: do_sset return correct value on fail Date: Sun, 13 Dec 2020 16:25:03 +0200 Message-Id: <20201213142503.25509-1-tariqt@nvidia.com> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: mkubecek+ethtool@suse.cz From: Roy Novich The return value for do_sset was constant and returned 0. This value is misleading when returned on operation failure. Changed return value to the correct function err status. Fixes: 32c8037055f5 ("Initial import of ethtool version 3 + a few patches.") Signed-off-by: Roy Novich Signed-off-by: Tariq Toukan --- ethtool.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ethtool.c b/ethtool.c index 1d9067e774af..5cc875c64591 100644 --- a/ethtool.c +++ b/ethtool.c @@ -3287,7 +3287,7 @@ static int do_sset(struct cmd_context *ctx) } } - return 0; + return err; } static int do_gregs(struct cmd_context *ctx)