diff options
author | Masahiro Yamada <yamada.masahiro@socionext.com> | 2015-07-14 10:01:44 +0900 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2015-07-16 00:11:03 +0200 |
commit | 39561e8bbb49752092b6afd9764d3f3aeef4e1d2 (patch) | |
tree | 7c83142cf160271b0e8e4d1109a81ae70b8ec45a /drivers/gpio/gpiolib-of.c | |
parent | 4c52bd5c61118a47166ed5857f17698ce520b5fd (diff) | |
download | op-kernel-dev-39561e8bbb49752092b6afd9764d3f3aeef4e1d2.zip op-kernel-dev-39561e8bbb49752092b6afd9764d3f3aeef4e1d2.tar.gz |
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: Masahiro Yamada <yamada.masahiro@socionext.com>
Acked-by: Alexandre Courbot <acourbot@nvidia.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/gpio/gpiolib-of.c')
-rw-r--r-- | drivers/gpio/gpiolib-of.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/gpio/gpiolib-of.c b/drivers/gpio/gpiolib-of.c index 9a0ec48..fd2db4b 100644 --- a/drivers/gpio/gpiolib-of.c +++ b/drivers/gpio/gpiolib-of.c @@ -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, }; @@ -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; } /** |