From: Dohyun Kim Date: Thu, 16 May 2019 08:53:18 +0000 (+0900) Subject: [9610] fimc-is2: fix accessing to out of boundary at otp checking seq in 5e9 module X-Git-Tag: MMI-RSBS31.Q1-48-36-26~164 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=e3c117d7009184fb345236b323bb1e67b3257408;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git [9610] fimc-is2: fix accessing to out of boundary at otp checking seq in 5e9 module CRs-fixed: (CR) Change-Id: I3b2f4a3a9f07d19234091b5bae7abdfd6c87c3b8 Signed-off-by: Dohyun Kim Reviewed-on: https://gerrit.mot.com/1358071 SLTApproved: Slta Waiver SME-Granted: SME Approvals Granted Tested-by: Jira Key Reviewed-by: Dawei Wang Reviewed-by: Biming Li Reviewed-by: Zhichao Chen Submit-Approved: Jira Key --- diff --git a/drivers/media/platform/exynos/fimc-is2/sensor/module_framework/cis/fimc-is-cis-5e9.c b/drivers/media/platform/exynos/fimc-is2/sensor/module_framework/cis/fimc-is-cis-5e9.c index 7ab23a2b8cc9..660de6987fc1 100755 --- a/drivers/media/platform/exynos/fimc-is2/sensor/module_framework/cis/fimc-is-cis-5e9.c +++ b/drivers/media/platform/exynos/fimc-is2/sensor/module_framework/cis/fimc-is-cis-5e9.c @@ -349,7 +349,7 @@ int sensor_5e9_cis_otp_read(struct v4l2_subdev *subdev, struct fimc_is_device_se err("%s: OTP page[%d] read fail with err(%d)\n", __func__, page, val); - for (i = page_index_start; i <= page_index_end; i++) { + for (i = page_index_start; i < page_index_end; i++) { fimc_is_sensor_read8(client, page_base + i, &device->otp_cal_buf[page][i]); dbg_sensor(2, "cal: [%d][0x%x]: %x\n", page, OTP_PAGE_BASE + i, device->otp_cal_buf[page][i]); }