summaryrefslogtreecommitdiffstats
path: root/drivers/gpio
diff options
context:
space:
mode:
authorVladimir Zapolskiy <vz@mleia.com>2017-12-21 18:37:30 +0200
committerLinus Walleij <linus.walleij@linaro.org>2018-01-02 09:33:07 +0100
commitdd3b9a44083d3815517a692f8181be8c30c0a1aa (patch)
treed37fbe7375ea1f1f7bc68f89f0d80af243960694 /drivers/gpio
parent30322bcf82d74cad0d6e1cf9ba7fa7fa48c7a026 (diff)
downloadlinux-dd3b9a44083d3815517a692f8181be8c30c0a1aa.tar.gz
linux-dd3b9a44083d3815517a692f8181be8c30c0a1aa.tar.bz2
linux-dd3b9a44083d3815517a692f8181be8c30c0a1aa.zip
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.c2
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;
}