Commit 39561e8b authored by Masahiro Yamada's avatar Masahiro Yamada Committed by Linus Walleij

gpio: of: remove unnecessary variable in of_get_gpio_hog()

The variable "desc" is only used for storing the return value at the
end of the function.  It is unneeded.
Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
Acked-by: default avatarAlexandre Courbot <acourbot@nvidia.com>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent 4c52bd5c
...@@ -136,7 +136,6 @@ static struct gpio_desc *of_get_gpio_hog(struct device_node *np, ...@@ -136,7 +136,6 @@ static struct gpio_desc *of_get_gpio_hog(struct device_node *np,
{ {
struct device_node *chip_np; struct device_node *chip_np;
enum of_gpio_flags xlate_flags; enum of_gpio_flags xlate_flags;
struct gpio_desc *desc;
struct gg_data gg_data = { struct gg_data gg_data = {
.flags = &xlate_flags, .flags = &xlate_flags,
}; };
...@@ -193,9 +192,7 @@ static struct gpio_desc *of_get_gpio_hog(struct device_node *np, ...@@ -193,9 +192,7 @@ static struct gpio_desc *of_get_gpio_hog(struct device_node *np,
if (name && of_property_read_string(np, "line-name", name)) if (name && of_property_read_string(np, "line-name", name))
*name = np->name; *name = np->name;
desc = gg_data.out_gpio; return gg_data.out_gpio;
return desc;
} }
/** /**
......
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