From: ddl Date: Fri, 28 Jun 2013 03:16:15 +0000 (+0800) Subject: camera: generic_sensor v0.1.9 X-Git-Tag: firefly_0821_release~6965^2~15 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=d4615ab308d14a12bfd9a49014491005370009da;p=firefly-linux-kernel-4.4.55.git camera: generic_sensor v0.1.9 --- diff --git a/drivers/media/video/generic_sensor.c b/drivers/media/video/generic_sensor.c index ec12fb506cb3..00e26c6f6ac6 100755 --- a/drivers/media/video/generic_sensor.c +++ b/drivers/media/video/generic_sensor.c @@ -22,9 +22,11 @@ * add support flash control; * *v0.1.5/v0.1.7: -* fix use v4l2_mbus_framefmt.reserved array overflow in generic_sensor_s_fmt; +* fix use v4l2_mbus_framefmt.reserved array overflow in generic_sensor_s_fmt; +*v0.1.9: +* fix sensor_find_ctrl may be overflow; */ -static int version = KERNEL_VERSION(0,1,7); +static int version = KERNEL_VERSION(0,1,9); module_param(version, int, S_IRUGO); diff --git a/drivers/media/video/generic_sensor.h b/drivers/media/video/generic_sensor.h index 5ea8e46a5365..8b77a356e473 100755 --- a/drivers/media/video/generic_sensor.h +++ b/drivers/media/video/generic_sensor.h @@ -421,7 +421,7 @@ static inline struct sensor_v4l2ctrl_info_s* sensor_find_ctrl( { int i; - for (i = 0; i < ops[i].num_ctrls; i++) + for (i = 0; i < ops[0].num_ctrls; i++) if (ops[i].qctrl->id == id) return &ops[i];