Skip to content

Commit

Permalink
gpiolib: remove a redundant check in gpiod_to_chip()
Browse files Browse the repository at this point in the history
This non-functional change slightly simplifies the implementation
of gpiod_to_chip() function.

Signed-off-by: Vladimir Zapolskiy <vz@mleia.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
  • Loading branch information
Vladimir Zapolskiy authored and Linus Walleij committed Jan 2, 2018
1 parent 30322bc commit dd3b9a4
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 @@ -161,7 +161,7 @@ EXPORT_SYMBOL_GPL(desc_to_gpio);
*/
struct gpio_chip *gpiod_to_chip(const struct gpio_desc *desc)
{
if (!desc || !desc->gdev || !desc->gdev->chip)
if (!desc || !desc->gdev)
return NULL;
return desc->gdev->chip;
}
Expand Down

0 comments on commit dd3b9a4

Please sign in to comment.