]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commitdiff
gpiolib: remove redundant initialization of pointer desc
authorColin Ian King <colin.king@canonical.com>
Tue, 16 Jan 2018 11:56:11 +0000 (11:56 +0000)
committerLinus Walleij <linus.walleij@linaro.org>
Wed, 17 Jan 2018 06:44:16 +0000 (07:44 +0100)
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>
drivers/gpio/gpiolib.c

index 4092b8601c4e5f959578487f904c6f180c7e93ba..37e31ba82ca09b7c888f1c5116cab0bb96b7f4b9 100644 (file)
@@ -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;