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

Commit 6273e787 authored by Alok Chauhan's avatar Alok Chauhan
Browse files

msm: camera: cdm: correct the error check in cmd submit irq



Correct the error check in cdm submit irq routine by using
updated bl_depth value instead of hardcoded value.

CRs-Fixed: 2605296
Change-Id: I267693ac5c8145fdf5c2dcf0fc5d80ce1e16b8a8
Signed-off-by: default avatarAlok Chauhan <alokc@codeaurora.org>
parent 97ed71f4
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -631,10 +631,13 @@ int cam_hw_cdm_submit_gen_irq(
	int rc;
	bool bit_wr_enable = false;

	if (core->bl_fifo[fifo_idx].bl_tag > 63) {
	if (core->bl_fifo[fifo_idx].bl_tag >
		(core->bl_fifo[fifo_idx].bl_depth - 1)) {
		CAM_ERR(CAM_CDM,
			"bl_tag invalid =%d",
			core->bl_fifo[fifo_idx].bl_tag);
			"Invalid bl_tag=%d bl_depth=%d fifo_idx=%d",
			core->bl_fifo[fifo_idx].bl_tag,
			core->bl_fifo[fifo_idx].bl_depth,
			fifo_idx);
		rc = -EINVAL;
		goto end;
	}