media: cxd2880-spi: Fix an error handling path
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Thu, 10 Jun 2021 19:54:31 +0000 (21:54 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 15 Sep 2021 07:50:31 +0000 (09:50 +0200)
commit38235f195de92b172224eedca0e2ac8bdf2c8c6d
tree2e81fd5bbfbc3817a369771bbe71e6026c019723
parent25fbfc31ceec99cec4e3284d911d6c975d8561e7
media: cxd2880-spi: Fix an error handling path

[ Upstream commit dcb0145821017e929a733e2271c85c6f82b9c9f8 ]

If an error occurs after a successful 'regulator_enable()' call,
'regulator_disable()' must be called.

Fix the error handling path of the probe accordingly.

Fixes: cb496cd472af ("media: cxd2880-spi: Add optional vcc regulator")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/media/spi/cxd2880-spi.c