From patchwork Thu Feb 24 03:35:36 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Randy Dunlap X-Patchwork-Id: 12757828 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B46A2C433F5 for ; Thu, 24 Feb 2022 03:35:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229572AbiBXDgK (ORCPT ); Wed, 23 Feb 2022 22:36:10 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32818 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229452AbiBXDgG (ORCPT ); Wed, 23 Feb 2022 22:36:06 -0500 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D0166254564 for ; Wed, 23 Feb 2022 19:35:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type: Content-ID:Content-Description:In-Reply-To:References; bh=pADByy9hHSCm6K1PtULkC4wcb5MipbuML4dpuyav+nM=; b=TKPlMNU3PLvsBPnIQZ69Bkt419 neAuLTNybqugK8Q7ym1gCtfQEf8XVAF5V2Pa28Rj4p2iEctE5woJJ42cmOXSdIxGJcIVKUov4QALO XhsX5wCbw7Uv2QuFSd45Df/XstAQdYz1kH6kT2RUl41Yx8sQN6zaSO9bgITrlgFnLXqR9waa1AQ7e xpLNnF1ecdveBGecP6UNIF5BheSatOAAK9exKhrk0r7HsnbYp6EyV5ev2iDHFpWKFHUKOePX9mNEx yXfuyXCoub6q0k1oKRWKr90zX91FOKt2YpTCqRLtCYO1lniyvxj2AdKIDwLfZR76WY+s3aDcXp0e2 sNgcXUlQ==; Received: from [2601:1c0:6280:3f0::aa0b] (helo=bombadil.infradead.org) by bombadil.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1nN4um-00GeG7-Tf; Thu, 24 Feb 2022 03:35:37 +0000 From: Randy Dunlap To: netdev@vger.kernel.org Cc: patches@lists.linux.dev, Randy Dunlap , Igor Zhbanov , Giuseppe Cavallaro , Alexandre Torgue , Jose Abreu , "David S. Miller" , Jakub Kicinski Subject: [PATCH] net: stmmac: fix return value of __setup handler Date: Wed, 23 Feb 2022 19:35:36 -0800 Message-Id: <20220224033536.25056-1-rdunlap@infradead.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org __setup() handlers should return 1 on success, i.e., the parameter has been handled. A return of 0 causes the "option=value" string to be added to init's environment strings, polluting it. Fixes: 47dd7a540b8a ("net: add support for STMicroelectronics Ethernet controllers.") Fixes: f3240e2811f0 ("stmmac: remove warning when compile as built-in (V2)") Signed-off-by: Randy Dunlap Reported-by: Igor Zhbanov Link: lore.kernel.org/r/64644a2f-4a20-bab3-1e15-3b2cdd0defe3@omprussia.ru Cc: Giuseppe Cavallaro Cc: Alexandre Torgue Cc: Jose Abreu Cc: "David S. Miller" Cc: Jakub Kicinski --- drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) --- linux-next-20220223.orig/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +++ linux-next-20220223/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c @@ -7414,7 +7414,7 @@ static int __init stmmac_cmdline_opt(cha char *opt; if (!str || !*str) - return -EINVAL; + return 1; while ((opt = strsep(&str, ",")) != NULL) { if (!strncmp(opt, "debug:", 6)) { if (kstrtoint(opt + 6, 0, &debug)) @@ -7445,11 +7445,11 @@ static int __init stmmac_cmdline_opt(cha goto err; } } - return 0; + return 1; err: pr_err("%s: ERROR broken module parameter conversion", __func__); - return -EINVAL; + return 1; } __setup("stmmaceth=", stmmac_cmdline_opt);