[9610] fimc-is2: fix accessing to out of boundary at otp checking seq in 5e9 module
authorDohyun Kim <dh5.kim@samsung.com>
Thu, 16 May 2019 08:53:18 +0000 (17:53 +0900)
committerlingsen1 <lingsen1@lenovo.com>
Sun, 7 Feb 2021 09:37:02 +0000 (17:37 +0800)
CRs-fixed: (CR)

Change-Id: I3b2f4a3a9f07d19234091b5bae7abdfd6c87c3b8
Signed-off-by: Dohyun Kim <dh5.kim@samsung.com>
Reviewed-on: https://gerrit.mot.com/1358071
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Dawei Wang <wangdw10@motorola.com>
Reviewed-by: Biming Li <libm1@motorola.com>
Reviewed-by: Zhichao Chen <chenzc2@motorola.com>
Submit-Approved: Jira Key

drivers/media/platform/exynos/fimc-is2/sensor/module_framework/cis/fimc-is-cis-5e9.c

index 7ab23a2b8cc969778dbadeb34d7deec7006f7560..660de6987fc1ce07282d223eba4ed3c18be512e9 100755 (executable)
@@ -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]);
                }