Browse Source

msm: camera: csiphy: Add missing base address assignment

Adding base address assignement while reading the status registers
in case of PN9 pattern recieve incorrectly. Without this assignment
there will be null pointer dereferncing issue.

CRs-Fixed: 2991847
Change-Id: I36b21f52e437807efab26a00c961ebbf11f8ded7
Signed-off-by: Jigarkumar Zala <[email protected]>
Jigarkumar Zala 4 years ago
parent
commit
4492cfd331
1 changed files with 4 additions and 0 deletions
  1. 4 0
      drivers/cam_sensor_module/cam_csiphy/cam_csiphy_core.c

+ 4 - 0
drivers/cam_sensor_module/cam_csiphy/cam_csiphy_core.c

@@ -1333,6 +1333,8 @@ static void __cam_csiphy_read_2phase_bist_debug_status(
 	struct csiphy_reg_t *csiphy_common_reg = NULL;
 	void __iomem *csiphybase = NULL;
 
+	csiphybase = csiphy_dev->soc_info.reg_map[0].mem_base;
+
 	for (i = 0; i < bist_status_arr_size; i++) {
 		csiphy_common_reg = &csiphy_dev->ctrl_reg->csiphy_bist_reg
 			->bist_status_err_check_arr[i];
@@ -1406,6 +1408,8 @@ static void __cam_csiphy_read_3phase_bist_debug_status(
 	struct csiphy_reg_t *csiphy_common_reg = NULL;
 	void __iomem *csiphybase = NULL;
 
+	csiphybase = csiphy_dev->soc_info.reg_map[0].mem_base;
+
 	for (i = 0; i < bist_status_arr_size; i++) {
 		csiphy_common_reg = &csiphy_dev->ctrl_reg->csiphy_bist_reg
 			->bist_status_err_check_arr[i];