OSDN Git Service

gpio: aggregator: Drop pre-initialization in get_arg()
authorGeert Uytterhoeven <geert+renesas@glider.be>
Wed, 1 Jul 2020 11:42:11 +0000 (13:42 +0200)
committerLinus Walleij <linus.walleij@linaro.org>
Tue, 7 Jul 2020 12:30:27 +0000 (14:30 +0200)
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>
drivers/gpio/gpio-aggregator.c

index 9b0adbd..62a3fcb 100644 (file)
@@ -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;