diff options
| author | Andy Shevchenko <[email protected]> | 2020-12-16 04:43:27 +0000 |
|---|---|---|
| committer | Linus Torvalds <[email protected]> | 2020-12-16 06:46:16 +0000 |
| commit | e291851d65495739e4eede33b6bc387bb546a19b (patch) | |
| tree | 3d9badab89dc17588db8c10a6d811093f08e4a8b /lib/string.c | |
| parent | lib/test_lockup.c: minimum fix to get it compiled on PREEMPT_RT (diff) | |
| download | kernel-e291851d65495739e4eede33b6bc387bb546a19b.tar.gz kernel-e291851d65495739e4eede33b6bc387bb546a19b.zip | |
lib/cmdline: fix get_option() for strings starting with hyphen
When string doesn't have an integer and starts from hyphen get_option()
may return interesting results. Fix it to return 0.
The simple_strtoull() is used due to absence of simple_strtoul() in a boot
code on some architectures.
Note, the Fixes tag below is rather for anthropological curiosity.
Link: https://lkml.kernel.org/r/[email protected]
Fixes: f68565831e72 ("Import 2.4.0-test2pre3")
Signed-off-by: Andy Shevchenko <[email protected]>
Cc: Brendan Higgins <[email protected]>
Cc: David Gow <[email protected]>
Cc: Mark Brown <[email protected]>
Cc: Matti Vaittinen <[email protected]>
Cc: Shuah Khan <[email protected]>
Cc: Vitor Massaru Iha <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'lib/string.c')
0 files changed, 0 insertions, 0 deletions
