Skip to content

Commit

Permalink
gpio: of: remove unnecessary variable in of_get_gpio_hog()
Browse files Browse the repository at this point in the history
The variable "desc" is only used for storing the return value at the
end of the function.  It is unneeded.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Acked-by: Alexandre Courbot <acourbot@nvidia.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
  • Loading branch information
Masahiro Yamada authored and Linus Walleij committed Jul 15, 2015
1 parent 4c52bd5 commit 39561e8
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions drivers/gpio/gpiolib-of.c
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,6 @@ static struct gpio_desc *of_get_gpio_hog(struct device_node *np,
{
struct device_node *chip_np;
enum of_gpio_flags xlate_flags;
struct gpio_desc *desc;
struct gg_data gg_data = {
.flags = &xlate_flags,
};
Expand Down Expand Up @@ -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))
*name = np->name;

desc = gg_data.out_gpio;

return desc;
return gg_data.out_gpio;
}

/**
Expand Down

0 comments on commit 39561e8

Please sign in to comment.