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

Commit d100f730 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: camera: Return correct code when camera open fails"

parents eff57c59 7073bf20
Loading
Loading
Loading
Loading
+10 −1
Original line number Diff line number Diff line
@@ -69,8 +69,17 @@ static int camera_check_event_status(struct v4l2_event *event)
				__func__);
		pr_err("%s : Line %d event_data->status 0X%x\n",
				__func__, __LINE__, event_data->status);

		switch (event_data->status) {
		case MSM_CAMERA_ERR_CMD_FAIL:
		case MSM_CAMERA_ERR_MAPPING:
			return -EFAULT;
		case MSM_CAMERA_ERR_DEVICE_BUSY:
			return -EBUSY;
		default:
			return -EFAULT;
		}
	}

	return 0;
}
+1 −0
Original line number Diff line number Diff line
@@ -126,6 +126,7 @@
#define MSM_CAMERA_ERR_EVT_BASE 0x00010000
#define MSM_CAMERA_ERR_CMD_FAIL (MSM_CAMERA_ERR_EVT_BASE + 1)
#define MSM_CAMERA_ERR_MAPPING  (MSM_CAMERA_ERR_EVT_BASE + 2)
#define MSM_CAMERA_ERR_DEVICE_BUSY  (MSM_CAMERA_ERR_EVT_BASE + 3)

/* The msm_v4l2_event_data structure should match the
 * v4l2_event.u.data field.