Explorar el Código

Merge "msm: camera: cci: Correct the check and return code" into camera-kernel.lnx.4.0

Camera Software Integration hace 5 años
padre
commit
07a53e7a01

+ 5 - 3
drivers/cam_sensor_module/cam_cci/cam_cci_core.c

@@ -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
drivers/cam_sensor_module/cam_cci/cam_cci_dev.c

@@ -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
drivers/cam_sensor_module/cam_cci/cam_cci_dev.h

@@ -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;