From 2da14a4dcd1c1513b6a81268ed9560a9796206bf Mon Sep 17 00:00:00 2001 From: Jigarkumar Zala Date: Fri, 5 Feb 2021 09:33:17 -0800 Subject: [PATCH] msm: camera: csiphy: Correct return code Currently for CPHY sensor driver expectes data rate specific configuration. It can be possible that CPHY driver has the same configuration among differnt data rates. This change accept this possibility and return success in case of data specific configutaion is not found. CRs-Fixed: 2872304 Change-Id: I358d7f4d82028794ab233311bb1d256f1f0cac5e Signed-off-by: Jigarkumar Zala --- .../cam_sensor_module/cam_csiphy/cam_csiphy_core.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/drivers/cam_sensor_module/cam_csiphy/cam_csiphy_core.c b/drivers/cam_sensor_module/cam_csiphy/cam_csiphy_core.c index 56f1f79cea..ab3630b261 100644 --- a/drivers/cam_sensor_module/cam_csiphy/cam_csiphy_core.c +++ b/drivers/cam_sensor_module/cam_csiphy/cam_csiphy_core.c @@ -591,14 +591,17 @@ static int cam_csiphy_cphy_data_rate_config( uint8_t skew_cal_enable = 0; int32_t delay = 0; - if ((csiphy_device == NULL) || - (csiphy_device->ctrl_reg == NULL) || - (csiphy_device->ctrl_reg->data_rates_settings_table == NULL)) { - CAM_DBG(CAM_CSIPHY, - "Data rate specific register table not found"); + if ((csiphy_device == NULL) || (csiphy_device->ctrl_reg == NULL)) { + CAM_ERR(CAM_CSIPHY, "Device is NULL"); return -EINVAL; } + if (csiphy_device->ctrl_reg->data_rates_settings_table == NULL) { + CAM_DBG(CAM_CSIPHY, + "Data rate specific register table not available"); + return 0; + } + phy_data_rate = csiphy_device->csiphy_info[idx].data_rate; csiphybase = csiphy_device->soc_info.reg_map[0].mem_base;