Skip to content

Commit

Permalink
[media] marvell-cam: power down mmp camera on registration failure
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jonathan Corbet authored and Mauro Carvalho Chehab committed Jul 27, 2011
1 parent c9fb8bf commit 221a824
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/media/video/marvell-ccic/mmp-driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 221a824

Please sign in to comment.