net: stmmac: fix return value of __setup handler
Subsystems (4)
PATCH 1/1 net: stmmac: fix return value of __setup handler
__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 <[email protected]>
Reported-by Igor Zhbanov <[email protected]>
Link lore.kernel.org/r/[email protected]
Cc Giuseppe Cavallaro <[email protected]>
Cc Alexandre Torgue <[email protected]>
Cc Jose Abreu <[email protected]>
Cc "David S. Miller" <[email protected]>
Cc Jakub Kicinski <[email protected]>
--- drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +3 -3
@@ -7414,7 +7414,7 @@ static int __init stmmac_cmdline_opt(chachar *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);
This patch was applied to netdev/net.git (master) by Jakub Kicinski <[email protected]>:
Hello:
This patch was applied to netdev/net.git (master)
by Jakub Kicinski <[email protected]>:
Quoted 15 lines · On Wed, 23 Feb 2022 19:35:36 -0800 you wrote:
__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 <[email protected]>Reported-by Igor Zhbanov <[email protected]>Link lore.kernel.org/r/[email protected]Cc Giuseppe Cavallaro <[email protected]>Cc Alexandre Torgue <[email protected]>Cc Jose Abreu <[email protected]>Cc "David S. Miller" <[email protected]>Cc Jakub Kicinski <[email protected]>
Quoted 1 line
[...]
Here is the summary with links:
- net: stmmac: fix return value of __setup handler
https://git.kernel.org/netdev/net/c/e01b042e580f
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html