diff options
author | Geert Uytterhoeven <geert+renesas@glider.be> | 2020-07-01 13:42:11 +0200 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2020-07-07 14:30:27 +0200 |
commit | 2073ea3ab181d42b4fd179ec3f74d53acefb563a (patch) | |
tree | 82e6b6ecc0c45ad24ace54f23ecb873ecf87c036 /drivers/gpio/gpio-aggregator.c | |
parent | gpio: Add gpio-charger to the documentation (diff) | |
download | linux-2073ea3ab181d42b4fd179ec3f74d53acefb563a.tar.xz linux-2073ea3ab181d42b4fd179ec3f74d53acefb563a.zip |
gpio: aggregator: Drop pre-initialization in get_arg()
In get_arg(), the variable start is pre-initialized, but overwritten
again in the first statement. Rework the assignment to not rely on
pre-initialization, to make the code easier to read.
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/r/20200701114212.8520-2-geert+renesas@glider.be
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/gpio/gpio-aggregator.c')
-rw-r--r-- | drivers/gpio/gpio-aggregator.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpio/gpio-aggregator.c b/drivers/gpio/gpio-aggregator.c index 9b0adbdddbfc..62a3fcbd4b4b 100644 --- a/drivers/gpio/gpio-aggregator.c +++ b/drivers/gpio/gpio-aggregator.c @@ -38,9 +38,9 @@ static DEFINE_IDR(gpio_aggregator_idr); static char *get_arg(char **args) { - char *start = *args, *end; + char *start, *end; - start = skip_spaces(start); + start = skip_spaces(*args); if (!*start) return NULL; |