lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20180226130529.ljgnerrz72wyy6mm@flea.lan>
Date:   Mon, 26 Feb 2018 14:05:29 +0100
From:   Maxime Ripard <maxime.ripard@...tlin.com>
To:     Linus Walleij <linus.walleij@...aro.org>
Cc:     Chen-Yu Tsai <wens@...e.org>,
        "open list:GPIO SUBSYSTEM" <linux-gpio@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] gpiolib: Keep returning EPROBE_DEFER when we should

On Mon, Feb 26, 2018 at 11:24:35AM +0100, Linus Walleij wrote:
> On Wed, Feb 21, 2018 at 10:16 AM, Maxime Ripard
> <maxime.ripard@...tlin.com> wrote:
> > On Wed, Feb 21, 2018 at 09:17:15AM +0100, Linus Walleij wrote:
> >> On Wed, Feb 21, 2018 at 9:11 AM, Maxime Ripard
> >> <maxime.ripard@...tlin.com> wrote:
> >>
> > This is slightly embarrassing, but that patch doesn't actually fix
> > anything. I tried to be smart and rework it to look nicer, and
> > obviously failed.
> >
> > Can you squash
> > http://code.bulix.org/z1vkt1-286673
> >
> > in the commit?
> 
> This site is down.

Sorry :/

> Can you send a new version of the patch or just reply with the
> change inline here?

Here it is:

---------8<----------------
diff --git a/drivers/gpio/gpiolib-of.c b/drivers/gpio/gpiolib-of.c
index c92847ff5d0a..ae70f679459c 100644
--- a/drivers/gpio/gpiolib-of.c
+++ b/drivers/gpio/gpiolib-of.c
@@ -241,8 +241,6 @@ struct gpio_desc *of_find_gpio(struct device *dev, const char *con_id,
 
                desc = of_get_named_gpiod_flags(dev->of_node, prop_name, idx,
                                                &of_flags);
-               if (!IS_ERR(desc) || (PTR_ERR(desc) != -ENOENT))
-                       break;
 
                /*
                 * -EPROBE_DEFER in our case means that we found a
@@ -256,6 +254,9 @@ struct gpio_desc *of_find_gpio(struct device *dev, const char *con_id,
                 */
                if (IS_ERR(desc) && PTR_ERR(desc) == -EPROBE_DEFER)
                        return desc;
+
+               if (!IS_ERR(desc) || (PTR_ERR(desc) != -ENOENT))
+                       break;
        }
 
        /* Special handling for SPI GPIOs if used */
----------8<-----------------

-- 
Maxime Ripard, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com

Download attachment "signature.asc" of type "application/pgp-signature" (834 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ