From bb91db920155537f249a49da4d09d914d49f59cb Mon Sep 17 00:00:00 2001 From: Lokesh Kumar Aakulu Date: Thu, 12 Oct 2017 14:09:09 +0530 Subject: [PATCH] msm: camera: isp: Initialize the isp clock index before enable During get clock routine there is a possiblity that clock index that is used for enable clock routine may become un-initialized with incorrect clock index which might ind- use zero isp clocks to be enabled and eventually make an unclocked access. So, initialize clock index correctly ba- sed on all combinations of clock names for given target device tree. Change-Id: I42cc72db45d29d79a84984b10dbb3c9c8112894b Signed-off-by: Lokesh Kumar Aakulu --- drivers/media/platform/msm/camera_v2/isp/msm_isp47.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/media/platform/msm/camera_v2/isp/msm_isp47.c b/drivers/media/platform/msm/camera_v2/isp/msm_isp47.c index 6716bb6caad6..70950a88fc66 100644 --- a/drivers/media/platform/msm/camera_v2/isp/msm_isp47.c +++ b/drivers/media/platform/msm/camera_v2/isp/msm_isp47.c @@ -2561,6 +2561,7 @@ int msm_vfe47_get_clks(struct vfe_device *vfe_dev) if (rc) return rc; + vfe_dev->num_norm_clk = vfe_dev->num_clk; for (i = 0; i < vfe_dev->num_clk; i++) { if (strcmp(vfe_dev->vfe_clk_info[i].clk_name, "camss_vfe_stream_clk") == 0) {