diff options
author | Vladimir Zapolskiy <vz@mleia.com> | 2017-12-21 18:37:30 +0200 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2018-01-02 09:33:07 +0100 |
commit | dd3b9a44083d3815517a692f8181be8c30c0a1aa (patch) | |
tree | d37fbe7375ea1f1f7bc68f89f0d80af243960694 /drivers/gpio | |
parent | 30322bcf82d74cad0d6e1cf9ba7fa7fa48c7a026 (diff) | |
download | linux-dd3b9a44083d3815517a692f8181be8c30c0a1aa.tar.bz2 |
gpiolib: remove a redundant check in gpiod_to_chip()
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>
Diffstat (limited to 'drivers/gpio')
-rw-r--r-- | drivers/gpio/gpiolib.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c index 02cf658eeedd..c23cc6b586ba 100644 --- a/drivers/gpio/gpiolib.c +++ b/drivers/gpio/gpiolib.c @@ -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; } |