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] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAPLW+4kwcE3itHaJZUt23_EUdbb3emXbfrcAjXvhm10d53oFCg@mail.gmail.com>
Date:   Wed, 27 Jul 2022 16:54:52 +0300
From:   Sam Protsenko <semen.protsenko@...aro.org>
To:     Saravana Kannan <saravanak@...gle.com>
Cc:     Tomasz Figa <tomasz.figa@...il.com>,
        Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>,
        Sylwester Nawrocki <s.nawrocki@...sung.com>,
        Alim Akhtar <alim.akhtar@...sung.com>,
        Linus Walleij <linus.walleij@...aro.org>,
        kernel-team@...roid.com, linux-arm-kernel@...ts.infradead.org,
        linux-samsung-soc@...r.kernel.org, linux-gpio@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH v1] pinctrl: samsung: Finish initializing the gpios before
 registering them

On Wed, 27 Jul 2022 at 04:33, Saravana Kannan <saravanak@...gle.com> wrote:
>
> As soon as a gpio is registered, it should be usable by a consumer. So,
> do all the initialization before registering the gpios. Without this
> change, a consumer can request a GPIO IRQ and have the gpio to IRQ
> mapping fail.
>
> Signed-off-by: Saravana Kannan <saravanak@...gle.com>
> ---

Reviewed-by: Sam Protsenko <semen.protsenko@...aro.org>

>  drivers/pinctrl/samsung/pinctrl-samsung.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/pinctrl/samsung/pinctrl-samsung.c b/drivers/pinctrl/samsung/pinctrl-samsung.c
> index 26d309d2516d..a302b38a63a8 100644
> --- a/drivers/pinctrl/samsung/pinctrl-samsung.c
> +++ b/drivers/pinctrl/samsung/pinctrl-samsung.c
> @@ -1168,15 +1168,15 @@ static int samsung_pinctrl_probe(struct platform_device *pdev)
>         if (ret)
>                 goto err_put_banks;
>
> -       ret = samsung_gpiolib_register(pdev, drvdata);
> -       if (ret)
> -               goto err_unregister;
> -
>         if (ctrl->eint_gpio_init)
>                 ctrl->eint_gpio_init(drvdata);
>         if (ctrl->eint_wkup_init)
>                 ctrl->eint_wkup_init(drvdata);
>
> +       ret = samsung_gpiolib_register(pdev, drvdata);
> +       if (ret)
> +               goto err_unregister;
> +
>         platform_set_drvdata(pdev, drvdata);
>
>         return 0;
> --
> 2.37.1.359.gd136c6c3e2-goog
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ