[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <b2ca9df3-6c02-d68d-3a85-acfc4d22217b@ti.com>
Date: Tue, 16 May 2023 10:19:51 -0500
From: Andrew Davis <afd@...com>
To: Andy Shevchenko <andy.shevchenko@...il.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 5/15/23 4:08 PM, Andy Shevchenko wrote:
> 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.
>
Sure, I can add that cleanup to my list.
Or maybe Coccinelle can help do this everywhere, will have to look into that.
Andrew
>> }
>
Powered by blists - more mailing lists