From 40a3c9db08ad59062c6ca525fca32ca97edcf99e Mon Sep 17 00:00:00 2001 From: Colin Ian King Date: Tue, 16 Jan 2018 11:56:11 +0000 Subject: 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 Signed-off-by: Linus Walleij --- drivers/gpio/gpiolib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/gpio/gpiolib.c') 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, enum gpiod_flags dflags, const char *label) { - struct gpio_desc *desc = ERR_PTR(-ENODEV); + struct gpio_desc *desc; unsigned long lflags = 0; enum of_gpio_flags flags; bool active_low = false; -- cgit v1.2.3