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)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Mon, 12 Jul 2021 12:27:47 +0000 (14:27 +0200)
commitdcb0145821017e929a733e2271c85c6f82b9c9f8
tree69bc845608251e9eeb68424e1f5abfa2a5f974a2
parent86541f0480b574cf299563156ac22ebf266ea5ec
media: cxd2880-spi: Fix an error handling path

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>
drivers/media/spi/cxd2880-spi.c