From: Masahiro Yamada Date: Tue, 14 Jul 2015 01:01:44 +0000 (+0900) Subject: gpio: of: remove unnecessary variable in of_get_gpio_hog() X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=39561e8bbb49752092b6afd9764d3f3aeef4e1d2;p=sagit-ice-cold%2Fkernel_xiaomi_msm8998.git 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 Acked-by: Alexandre Courbot Signed-off-by: Linus Walleij --- diff --git a/drivers/gpio/gpiolib-of.c b/drivers/gpio/gpiolib-of.c index 9a0ec48a4737..fd2db4b3a709 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; } /**