aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVladimir Zapolskiy <vz@mleia.com>2017-12-21 11:37:30 -0500
committerLinus Walleij <linus.walleij@linaro.org>2018-01-02 03:33:07 -0500
commitdd3b9a44083d3815517a692f8181be8c30c0a1aa (patch)
treed37fbe7375ea1f1f7bc68f89f0d80af243960694
parent30322bcf82d74cad0d6e1cf9ba7fa7fa48c7a026 (diff)
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>
-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);
161 */ 161 */
162struct gpio_chip *gpiod_to_chip(const struct gpio_desc *desc) 162struct gpio_chip *gpiod_to_chip(const struct gpio_desc *desc)
163{ 163{
164 if (!desc || !desc->gdev || !desc->gdev->chip) 164 if (!desc || !desc->gdev)
165 return NULL; 165 return NULL;
166 return desc->gdev->chip; 166 return desc->gdev->chip;
167} 167}