Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f204cfe8 authored by Jeyaprakash Soundrapandian's avatar Jeyaprakash Soundrapandian Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: camera: flash: Release resources in case of error" into dev/msm-4.9-camx

parents b80b7a62 a50a7b33
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
/* Copyright (c) 2017, The Linux Foundation. All rights reserved.
/* Copyright (c) 2017-2018, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -41,6 +41,8 @@ static int32_t cam_flash_driver_cmd(struct cam_flash_ctrl *fctrl,
			CAM_ERR(CAM_FLASH,
				"Cannot apply Acquire dev: Prev state: %d",
				fctrl->flash_state);
			rc = -EINVAL;
			goto release_mutex;
		}

		if (fctrl->bridge_intf.device_hdl != -1) {
@@ -161,6 +163,8 @@ static int32_t cam_flash_driver_cmd(struct cam_flash_ctrl *fctrl,
			CAM_WARN(CAM_FLASH,
				"Cannot apply Stop dev: Prev state is: %d",
				fctrl->flash_state);
			rc = -EINVAL;
			goto release_mutex;
		}

		rc = cam_flash_stop_dev(fctrl);