regulator: gpio: Fix some error handling paths in 'gpio_regulator_probe()'
authorChristophe Jaillet <christophe.jaillet@wanadoo.fr>
Tue, 13 Mar 2018 20:33:11 +0000 (21:33 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 30 May 2018 05:52:32 +0000 (07:52 +0200)
commit1fae5e92788c0b9bc3b632a2de9ed6ef9333af32
tree244e1e02626e3eaabf961174e76f9a8ac17e6655
parent9fe2e97e6f2da8fb47bf842741cf9d508c9897f8
regulator: gpio: Fix some error handling paths in 'gpio_regulator_probe()'

[ Upstream commit ed8cffda27dea6fd3dafb3ee881c5a786edac9ca ]

Re-order error handling code and gotos to avoid leaks in error handling
paths.

Fixes: 9f946099fe19 ("regulator: gpio: fix parsing of gpio list")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/regulator/gpio-regulator.c