If registration does not work, we don't want to leave the sensor powered on.

Signed-off-by: Jonathan Corbet <cor...@lwn.net>
---
 drivers/media/video/marvell-ccic/mmp-driver.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/media/video/marvell-ccic/mmp-driver.c 
b/drivers/media/video/marvell-ccic/mmp-driver.c
index 8415915..d6b7645 100644
--- a/drivers/media/video/marvell-ccic/mmp-driver.c
+++ b/drivers/media/video/marvell-ccic/mmp-driver.c
@@ -267,8 +267,8 @@ static int mmpcam_probe(struct platform_device *pdev)
 
 out_unregister:
        mccic_shutdown(mcam);
-       mmpcam_power_down(mcam);
 out_gpio2:
+       mmpcam_power_down(mcam);
        gpio_free(pdata->sensor_reset_gpio);
 out_gpio:
        gpio_free(pdata->sensor_power_gpio);
-- 
1.7.6

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to