Re: [PATCH v3] gpio: sch311x: Use devm_gpiochip_add_data() to simplify remove path

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, May 15, 2023 at 8:42 PM Andrew Davis <afd@xxxxxx> 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




[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux