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.
}