[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHp75Veu-HbANATV2trD=wAkNx4zia2L8Y+roLQ9k9VA_Vxu3Q@mail.gmail.com>
Date: Tue, 16 May 2023 00:08:32 +0300
From: Andy Shevchenko <andy.shevchenko@...il.com>
To: Andrew Davis <afd@...com>
Cc: Peter Tyser <ptyser@...-inc.com>,
Andy Shevchenko <andy@...nel.org>,
Linus Walleij <linus.walleij@...aro.org>,
Bartosz Golaszewski <brgl@...ev.pl>,
linux-gpio@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3] gpio: sch311x: Use devm_gpiochip_add_data() to
simplify remove path
On Mon, May 15, 2023 at 8:42 PM Andrew Davis <afd@...com> wrote:
>
> Use devm version of gpiochip add function to handle removal for us.
...version of gpiochip_add() function...
...
> + err = devm_gpiochip_add_data(&pdev->dev, &block->chip, block);
> if (err < 0) {
> dev_err(&pdev->dev,
> "Could not register gpiochip, %d\n", err);
> - goto exit_err;
> + return err;
With this applied you can consider a followup to have this be converted to use
return dev_err_probe(...);
here and in other ->probe() related pieces.
> }
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists