Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

lib/parser.c: fix up comments for valid return values from match_number

match_number() has return values of -ENOMEM, -EINVAL and -ERANGE. So, for
all the functions calling match_number, the return value should include
these values. Fix up the comments to reflect the correct values.

Signed-off-by: Namjae Jeon <namjae.jeon@samsung.com>
Signed-off-by: Amit Sahrawat <a.sahrawat@samsung.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Namjae Jeon and committed by
Linus Torvalds
53769627 9e9cdc89

+3 -3
+3 -3
lib/parser.c
··· 157 157 * 158 158 * Description: Attempts to parse the &substring_t @s as a decimal integer. On 159 159 * success, sets @result to the integer represented by the string and returns 0. 160 - * Returns either -ENOMEM or -EINVAL on failure. 160 + * Returns -ENOMEM, -EINVAL, or -ERANGE on failure. 161 161 */ 162 162 int match_int(substring_t *s, int *result) 163 163 { ··· 171 171 * 172 172 * Description: Attempts to parse the &substring_t @s as an octal integer. On 173 173 * success, sets @result to the integer represented by the string and returns 174 - * 0. Returns either -ENOMEM or -EINVAL on failure. 174 + * 0. Returns -ENOMEM, -EINVAL, or -ERANGE on failure. 175 175 */ 176 176 int match_octal(substring_t *s, int *result) 177 177 { ··· 185 185 * 186 186 * Description: Attempts to parse the &substring_t @s as a hexadecimal integer. 187 187 * On success, sets @result to the integer represented by the string and 188 - * returns 0. Returns either -ENOMEM or -EINVAL on failure. 188 + * returns 0. Returns -ENOMEM, -EINVAL, or -ERANGE on failure. 189 189 */ 190 190 int match_hex(substring_t *s, int *result) 191 191 {