mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-10 23:29:46 +00:00
ACPI: thinkpad-acpi: skip blanks before the data when parsing sysfs
Skip blanks not just at the tail of sysfs writes, but also at the head. Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: Len Brown <len.brown@intel.com>
This commit is contained in:
parent
2369cc9492
commit
32afbf07aa
@ -709,6 +709,8 @@ static int parse_strtoul(const char *buf,
|
||||
{
|
||||
char *endp;
|
||||
|
||||
while (*buf && isspace(*buf))
|
||||
buf++;
|
||||
*value = simple_strtoul(buf, &endp, 0);
|
||||
while (*endp && isspace(*endp))
|
||||
endp++;
|
||||
|
Loading…
x
Reference in New Issue
Block a user