Skip to content

Commit 50e06dd

Browse files
rddunlapkuba-moo
authored andcommitted
net: sxgbe: 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: acc18c1 ("net: sxgbe: add EEE(Energy Efficient Ethernet) for Samsung sxgbe") Fixes: 1edb9ca ("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]>
1 parent b3a34dc commit 50e06dd

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

drivers/net/ethernet/samsung/sxgbe/sxgbe_main.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2285,18 +2285,18 @@ static int __init sxgbe_cmdline_opt(char *str)
22852285
char *opt;
22862286

22872287
if (!str || !*str)
2288-
return -EINVAL;
2288+
return 1;
22892289
while ((opt = strsep(&str, ",")) != NULL) {
22902290
if (!strncmp(opt, "eee_timer:", 10)) {
22912291
if (kstrtoint(opt + 10, 0, &eee_timer))
22922292
goto err;
22932293
}
22942294
}
2295-
return 0;
2295+
return 1;
22962296

22972297
err:
22982298
pr_err("%s: ERROR broken module parameter conversion\n", __func__);
2299-
return -EINVAL;
2299+
return 1;
23002300
}
23012301

23022302
__setup("sxgbeeth=", sxgbe_cmdline_opt);

0 commit comments

Comments
 (0)