Commit f0d1ab05 authored by Linus Walleij's avatar Linus Walleij

gpio: of: Normalize return code variable name

It is confusing to name return variables mixedly "status",
"err" or "ret". I just changed them all to "ret", by personal
preference, to lower cognitive stress.
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20190716115854.12098-1-linus.walleij@linaro.org
parent d377f56f
...@@ -848,7 +848,7 @@ static int of_gpiochip_add_pin_range(struct gpio_chip *chip) { return 0; } ...@@ -848,7 +848,7 @@ static int of_gpiochip_add_pin_range(struct gpio_chip *chip) { return 0; }
int of_gpiochip_add(struct gpio_chip *chip) int of_gpiochip_add(struct gpio_chip *chip)
{ {
int status; int ret;
if (!chip->of_node) if (!chip->of_node)
return 0; return 0;
...@@ -863,9 +863,9 @@ int of_gpiochip_add(struct gpio_chip *chip) ...@@ -863,9 +863,9 @@ int of_gpiochip_add(struct gpio_chip *chip)
of_gpiochip_init_valid_mask(chip); of_gpiochip_init_valid_mask(chip);
status = of_gpiochip_add_pin_range(chip); ret = of_gpiochip_add_pin_range(chip);
if (status) if (ret)
return status; return ret;
/* If the chip defines names itself, these take precedence */ /* If the chip defines names itself, these take precedence */
if (!chip->names) if (!chip->names)
...@@ -874,13 +874,13 @@ int of_gpiochip_add(struct gpio_chip *chip) ...@@ -874,13 +874,13 @@ int of_gpiochip_add(struct gpio_chip *chip)
of_node_get(chip->of_node); of_node_get(chip->of_node);
status = of_gpiochip_scan_gpios(chip); ret = of_gpiochip_scan_gpios(chip);
if (status) { if (ret) {
of_node_put(chip->of_node); of_node_put(chip->of_node);
gpiochip_remove_pin_ranges(chip); gpiochip_remove_pin_ranges(chip);
} }
return status; return ret;
} }
void of_gpiochip_remove(struct gpio_chip *chip) void of_gpiochip_remove(struct gpio_chip *chip)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment