Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

regulator: arizona-ldo1: Rely on core to handle GPIO descriptor

After making sure that the regulator core always take over
handling of the GPIO descriptors, the gpiod_put()
on the errorpath of the Arizona LDO1 driver becomes
redundant.

Reported-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Linus Walleij and committed by
Mark Brown
f306d760 daa531db

-3
-3
drivers/regulator/arizona-ldo1.c
··· 283 283 of_node_put(config.of_node); 284 284 285 285 if (IS_ERR(ldo1->regulator)) { 286 - if (config.ena_gpiod) 287 - gpiod_put(config.ena_gpiod); 288 - 289 286 ret = PTR_ERR(ldo1->regulator); 290 287 dev_err(&pdev->dev, "Failed to register LDO1 supply: %d\n", 291 288 ret);