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]
Date:	Fri, 5 Sep 2014 10:19:12 +0200
From:	Linus Walleij <linus.walleij@...aro.org>
To:	Pramod Gurav <pramod.gurav@...rtplayin.com>
Cc:	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	John Crispin <blogic@...nwrt.org>
Subject: Re: [PATCH] pinctrl: lantiq: Release gpiochip resources in fail case

On Sun, Aug 31, 2014 at 6:39 PM, Pramod Gurav
<pramod.gurav@...rtplayin.com> wrote:

> This patch releases gpiochip resources with of_gpiochip_remove
> gpiochip_remove in failure cases.
>
> CC: John Crispin <blogic@...nwrt.org>
> CC: Linus Walleij <linus.walleij@...aro.org>
> Signed-off-by: Pramod Gurav <pramod.gurav@...rtplayin.com>
> ---
>  drivers/pinctrl/pinctrl-xway.c |    3 +++
>  1 files changed, 3 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/pinctrl/pinctrl-xway.c b/drivers/pinctrl/pinctrl-xway.c
> index e66f4ca..d234dc2 100644
> --- a/drivers/pinctrl/pinctrl-xway.c
> +++ b/drivers/pinctrl/pinctrl-xway.c
> @@ -802,6 +802,7 @@ static int pinmux_xway_probe(struct platform_device *pdev)
>         ret = gpiochip_add(&xway_chip);
>         if (ret) {
>                 dev_err(&pdev->dev, "Failed to register gpio chip\n");
> +               of_gpiochip_remove(&xway_chip);
>                 return ret;
>         }
>
> @@ -823,6 +824,8 @@ static int pinmux_xway_probe(struct platform_device *pdev)
>         ret = ltq_pinctrl_register(pdev, &xway_info);
>         if (ret) {
>                 dev_err(&pdev->dev, "Failed to register pinctrl driver\n");
> +               gpiochip_remove(&xway_chip);
> +               of_gpiochip_remove(&xway_chip);

gpiochip_remove() already calls of_gpiochip_remove().

Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ