linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] gpiolib: remove a redundant check in gpiod_to_chip()
@ 2017-12-21 16:37 Vladimir Zapolskiy
  2018-01-02  8:33 ` Linus Walleij
  0 siblings, 1 reply; 2+ messages in thread
From: Vladimir Zapolskiy @ 2017-12-21 16:37 UTC (permalink / raw)
  To: Linus Walleij; +Cc: linux-gpio

This non-functional change slightly simplifies the implementation
of gpiod_to_chip() function.

Signed-off-by: Vladimir Zapolskiy <vz@mleia.com>
---
 drivers/gpio/gpiolib.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c
index 72577cd..6e19385 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;
 }
-- 
2.10.2


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] gpiolib: remove a redundant check in gpiod_to_chip()
  2017-12-21 16:37 [PATCH] gpiolib: remove a redundant check in gpiod_to_chip() Vladimir Zapolskiy
@ 2018-01-02  8:33 ` Linus Walleij
  0 siblings, 0 replies; 2+ messages in thread
From: Linus Walleij @ 2018-01-02  8:33 UTC (permalink / raw)
  To: Vladimir Zapolskiy; +Cc: linux-gpio

On Thu, Dec 21, 2017 at 5:37 PM, Vladimir Zapolskiy <vz@mleia.com> wrote:

> This non-functional change slightly simplifies the implementation
> of gpiod_to_chip() function.
>
> Signed-off-by: Vladimir Zapolskiy <vz@mleia.com>

Patch applied.

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-01-02  8:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-21 16:37 [PATCH] gpiolib: remove a redundant check in gpiod_to_chip() Vladimir Zapolskiy
2018-01-02  8:33 ` Linus Walleij

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).