From b573b0e65616c1ae5c5dd2c14fd62d3ded3d5466 Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Sun, 14 Feb 2016 02:33:05 +0200 Subject: [PATCH] greybus: camera: Clean up when AP link power mode configuration failed Restore the module link power mode to the previous state in that case. Signed-off-by: Laurent Pinchart Reviewed-by: Gjorgji Rosikopulos Tested-by: Jacopo Mondi Signed-off-by: Greg Kroah-Hartman --- drivers/staging/greybus/camera.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/staging/greybus/camera.c b/drivers/staging/greybus/camera.c index 8383770910c5..25dbf690e1fc 100644 --- a/drivers/staging/greybus/camera.c +++ b/drivers/staging/greybus/camera.c @@ -147,6 +147,7 @@ static int gb_camera_set_power_mode(struct gb_camera *gcam, bool hs) ret = gb_camera_set_intf_power_mode(gcam, svc->ap_intf_id, hs); if (ret < 0) { + gb_camera_set_intf_power_mode(gcam, intf->interface_id, !hs); gcam_err(gcam, "failed to set AP interface to %s (%d)\n", hs ? "HS" : "PWM", ret); return ret; -- 2.20.1