From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Bartosz Golaszewski <brgl@bgdev.pl>
Cc: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>,
Linus Walleij <linus.walleij@linaro.org>,
linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v1 1/1] gpiolib: Fix the error path order in gpiochip_add_data_with_key()
Date: Thu, 22 Feb 2024 15:25:24 +0200 [thread overview]
Message-ID: <ZddLRAqxFr7v3Zqs@smile.fi.intel.com> (raw)
In-Reply-To: <CAMRc=MdvYdx6x=gSiOZ3SXAdJORnqhsNW79G2c7wABofWARwFw@mail.gmail.com>
On Thu, Feb 22, 2024 at 10:37:06AM +0100, Bartosz Golaszewski wrote:
> On Wed, Feb 21, 2024 at 8:28 PM Andy Shevchenko
> <andriy.shevchenko@linux.intel.com> wrote:
> >
> > After shuffling the code, error path wasn't updated correctly.
> > Fix it here.
> > gpiochip_irqchip_free_valid_mask(gc);
> > err_remove_acpi_chip:
> > acpi_gpiochip_remove(gc);
> > + gpiochip_remove_pin_ranges(gc);
> > err_remove_of_chip:
> > gpiochip_free_hogs(gc);
> > of_gpiochip_remove(gc);
>
> This undoes machine_gpiochip_add() and I think it also needs to be
> moved before acpi_gpiochip_remove().
You mean it should be like
gpiochip_irqchip_free_valid_mask(gc);
gpiochip_free_hogs(gc);
err_remove_acpi_chip:
acpi_gpiochip_remove(gc);
gpiochip_remove_pin_ranges(gc);
err_remove_of_chip:
of_gpiochip_remove(gc);
?
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2024-02-22 13:25 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-21 19:28 [PATCH v1 1/1] gpiolib: Fix the error path order in gpiochip_add_data_with_key() Andy Shevchenko
2024-02-22 9:37 ` Bartosz Golaszewski
2024-02-22 13:25 ` Andy Shevchenko [this message]
2024-02-22 13:33 ` Bartosz Golaszewski
2024-02-22 13:37 ` Andy Shevchenko
2024-02-22 13:39 ` Bartosz Golaszewski
2024-02-29 16:29 ` Andy Shevchenko
2024-02-29 17:26 ` Bartosz Golaszewski
2024-02-29 18:21 ` Andy Shevchenko
2024-03-01 7:41 ` Bartosz Golaszewski
2024-03-01 17:31 ` Andy Shevchenko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZddLRAqxFr7v3Zqs@smile.fi.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=bartosz.golaszewski@linaro.org \
--cc=brgl@bgdev.pl \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.