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

Commit a1f63519 authored by Jigarkumar Zala's avatar Jigarkumar Zala
Browse files

msm: camera: cci: Correct the check and return code



Update the master status data type, as it expects the negative value
and do the operation accordingly. Also, correct the return code and
update the validation check.

CRs-Fixed: 2686717
Change-Id: I8ecae74de2995a08e532a7f0ef078d48d45a928e
Signed-off-by: default avatarJigarkumar Zala <jzala@codeaurora.org>
parent beb3ea37
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -148,15 +148,17 @@ static int32_t cam_cci_write_i2c_queue(struct cci_device *cci_dev,
{
	int32_t rc = 0;
	uint32_t reg_offset = master * 0x200 + queue * 0x100;
	struct cam_hw_soc_info *soc_info =
		&cci_dev->soc_info;
	void __iomem *base = soc_info->reg_map[0].mem_base;
	struct cam_hw_soc_info *soc_info = NULL;
	void __iomem *base = NULL;

	if (!cci_dev) {
		CAM_ERR(CAM_CCI, "Failed");
		return -EINVAL;
	}

	soc_info = &cci_dev->soc_info;
	base = soc_info->reg_map[0].mem_base;

	rc = cam_cci_validate_queue(cci_dev, 1, master, queue);
	if (rc < 0) {
		CAM_ERR(CAM_CCI, "Failed %d", rc);
+2 −2
Original line number Diff line number Diff line
@@ -33,8 +33,8 @@ static long cam_cci_subdev_ioctl(struct v4l2_subdev *sd,
	int32_t rc = 0;

	if (arg == NULL) {
		CAM_ERR(CAM_CCI, "Invalid Args");
		return rc;
		CAM_ERR(CAM_CCI, "Args is Null");
		return -EINVAL;
	}

	switch (cmd) {
+1 −1
Original line number Diff line number Diff line
@@ -124,7 +124,7 @@ struct cam_cci_i2c_queue_info {
};

struct cam_cci_master_info {
	uint32_t status;
	int32_t status;
	atomic_t q_free[NUM_QUEUES];
	uint8_t q_lock[NUM_QUEUES];
	uint8_t reset_pending;