Skip to content

Commit

Permalink
gpiolib: remove redundant initialization of pointer desc
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Colin Ian King authored and Linus Walleij committed Jan 17, 2018
1 parent 605f2d3 commit 40a3c9d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/gpio/gpiolib.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 40a3c9d

Please sign in to comment.