From: Vladimir Zapolskiy Date: Thu, 21 Dec 2017 16:37:30 +0000 (+0200) Subject: gpiolib: remove a redundant check in gpiod_to_chip() X-Git-Tag: v5.15~9534^2~28 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=dd3b9a44083d3815517a692f8181be8c30c0a1aa;p=platform%2Fkernel%2Flinux-starfive.git 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 Signed-off-by: Linus Walleij --- diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c index 02cf658..c23cc6b 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; }