commands: gpio: Use kstrtoint() instead of simple_strtoul()
Use kstrtoint() instead of simple_strtoul() in order to properly
handle invalid arguments. Current code using simple_strtoul() results
in following:

barebox@ZII RDU2 Board:/ gpio_get_value foo
barebox@ZII RDU2 Board:/ echo $?
0

whereas with this patch we get:

barebox@ZII RDU2 Board:/ gpio_get_value foo
gpio_get_value: Invalid argument

Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
1 parent 4f3713a commit 05a4b7d4b1b56af927d703e3667e1c7868bab1d4
@Andrey Smirnov Andrey Smirnov authored on 26 Oct 2018
Sascha Hauer committed on 29 Oct 2018
Showing 1 changed file
View
commands/gpio.c