aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorColin Ian King <colin.king@canonical.com>2018-01-16 06:56:11 -0500
committerLinus Walleij <linus.walleij@linaro.org>2018-01-17 01:44:16 -0500
commit40a3c9db08ad59062c6ca525fca32ca97edcf99e (patch)
tree7c31d9d0e33c17f6a7a88d1934224c63b0a00435
parent605f2d34ea52a14744fe3c6b43708bce7e2eb690 (diff)
gpiolib: remove redundant initialization of pointer desc
The initialized value stored in pointer desc is never read as it is updated in the first executable statement in the function. This is therefore redundant and can be removed. Cleans up clang warning: drivers/gpio/gpiolib.c:3710:20: warning: Value stored to 'desc' during its initialization is never read Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
-rw-r--r--drivers/gpio/gpiolib.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c
index 4092b8601c4e..37e31ba82ca0 100644
--- a/drivers/gpio/gpiolib.c
+++ b/drivers/gpio/gpiolib.c
@@ -3692,7 +3692,7 @@ struct gpio_desc *gpiod_get_from_of_node(struct device_node *node,
3692 enum gpiod_flags dflags, 3692 enum gpiod_flags dflags,
3693 const char *label) 3693 const char *label)
3694{ 3694{
3695 struct gpio_desc *desc = ERR_PTR(-ENODEV); 3695 struct gpio_desc *desc;
3696 unsigned long lflags = 0; 3696 unsigned long lflags = 0;
3697 enum of_gpio_flags flags; 3697 enum of_gpio_flags flags;
3698 bool active_low = false; 3698 bool active_low = false;