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

Commit 8936c338 authored by Deepak Kaushal's avatar Deepak Kaushal
Browse files

msm: camera: sensor: KW fix in Flash driver



Fix for suspicious dereference of pointer 'fctrl' before NULL check

Change-Id: Ifff111423bad822dfe65bd905080dca527b5a254
Signed-off-by: default avatarDeepak Kaushal <dkaushal@codeaurora.org>
parent 0b5fe757
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -209,13 +209,13 @@ int msm_flash_led_release(struct msm_led_flash_ctrl_t *fctrl)
	struct msm_camera_sensor_board_info *flashdata = NULL;
	struct msm_camera_power_ctrl_t *power_info = NULL;

	flashdata = fctrl->flashdata;
	power_info = &flashdata->power_info;
	CDBG("%s:%d called\n", __func__, __LINE__);
	if (!fctrl) {
		pr_err("%s:%d fctrl NULL\n", __func__, __LINE__);
		return -EINVAL;
	}
	flashdata = fctrl->flashdata;
	power_info = &flashdata->power_info;

	if (fctrl->led_state != MSM_CAMERA_LED_INIT) {
		pr_err("%s:%d invalid led state\n", __func__, __LINE__);