[media] marvell-cam: power down mmp camera on registration failure
authorJonathan Corbet <corbet@lwn.net>
Fri, 8 Jul 2011 20:50:48 +0000 (17:50 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Wed, 27 Jul 2011 20:55:54 +0000 (17:55 -0300)
If registration does not work, we don't want to leave the sensor powered on.

Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/video/marvell-ccic/mmp-driver.c

index 841591556994c7b4633c9e9e2f39a6678f7ee630..d6b764541375ef0f0076988e6809375af2f2686f 100644 (file)
@@ -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);