mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-05 02:19:51 +00:00
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 <laurent.pinchart@ideasonboard.com> Reviewed-by: Gjorgji Rosikopulos <grosikopulos@mm-sol.com> Tested-by: Jacopo Mondi <jacopo.mondi@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
parent
c161c0fc2f
commit
b573b0e656
1 changed files with 1 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue