mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-11-30 15:53:22 -05:00
net: sxgbe: fix return value of __setup handler
commit 50e06ddceeea263f57fe92baa677c638ecd65bb6 upstream. __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:acc18c147b("net: sxgbe: add EEE(Energy Efficient Ethernet) for Samsung sxgbe") Fixes:1edb9ca69e("net: sxgbe: add basic framework for Samsung 10Gb ethernet driver") Signed-off-by: Randy Dunlap <[email protected]> Reported-by: Igor Zhbanov <[email protected]> Link: lore.kernel.org/r/[email protected] Cc: Siva Reddy <[email protected]> Cc: Girish K S <[email protected]> Cc: Byungho An <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
This commit is contained in:
parent
a54dedf620
commit
044e209c72
1 changed files with 3 additions and 3 deletions
|
|
@ -2277,18 +2277,18 @@ static int __init sxgbe_cmdline_opt(char *str)
|
|||
char *opt;
|
||||
|
||||
if (!str || !*str)
|
||||
return -EINVAL;
|
||||
return 1;
|
||||
while ((opt = strsep(&str, ",")) != NULL) {
|
||||
if (!strncmp(opt, "eee_timer:", 10)) {
|
||||
if (kstrtoint(opt + 10, 0, &eee_timer))
|
||||
goto err;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
return 1;
|
||||
|
||||
err:
|
||||
pr_err("%s: ERROR broken module parameter conversion\n", __func__);
|
||||
return -EINVAL;
|
||||
return 1;
|
||||
}
|
||||
|
||||
__setup("sxgbeeth=", sxgbe_cmdline_opt);
|
||||
|
|
|
|||
Loading…
Reference in a new issue