diff options
author | Seung-Woo Kim <sw0312.kim@samsung.com> | 2014-11-20 16:45:47 +0900 |
---|---|---|
committer | Chanho Park <chanho61.park@samsung.com> | 2014-11-21 00:48:04 -0800 |
commit | 52908d98ebc676f817ad2bc9c3646e3d06d85b21 (patch) | |
tree | e51cbaf66591f5c841417bf519682c81ed5d5e1c /drivers/iio | |
parent | d8b315f4e6215c9fb3ff035cd96e7638e88b7e0e (diff) | |
download | linux-3.10-52908d98ebc676f817ad2bc9c3646e3d06d85b21.tar.gz linux-3.10-52908d98ebc676f817ad2bc9c3646e3d06d85b21.tar.bz2 linux-3.10-52908d98ebc676f817ad2bc9c3646e3d06d85b21.zip |
iio: st_gyro: Add sentinel into array to fix out-of-bound memory access
Without sentinel, of_match_node() to array causes out-of-bound
memory access. So this patch adds sentinel.
Change-Id: I22a4c117f68bba05acc27e7b4c6ad86471e6cf6d
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Diffstat (limited to 'drivers/iio')
-rw-r--r-- | drivers/iio/gyro/st_gyro_i2c.c | 1 | ||||
-rw-r--r-- | drivers/iio/gyro/st_gyro_spi.c | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/drivers/iio/gyro/st_gyro_i2c.c b/drivers/iio/gyro/st_gyro_i2c.c index 97fd245400f..ff3e70ba105 100644 --- a/drivers/iio/gyro/st_gyro_i2c.c +++ b/drivers/iio/gyro/st_gyro_i2c.c @@ -77,6 +77,7 @@ static struct of_device_id st_gyro_dt_match[] = { { .compatible = "st,l3gd20h" }, { .compatible = "st,l3g4is-ui" }, { .compatible = "st,lsm330-gyro" }, + { }, }; #endif diff --git a/drivers/iio/gyro/st_gyro_spi.c b/drivers/iio/gyro/st_gyro_spi.c index b1e03cfc2ef..a28657cdab4 100644 --- a/drivers/iio/gyro/st_gyro_spi.c +++ b/drivers/iio/gyro/st_gyro_spi.c @@ -76,6 +76,7 @@ static struct of_device_id st_gyro_dt_match[] = { { .compatible = "st,l3gd20h" }, { .compatible = "st,l3g4is-ui" }, { .compatible = "st,lsm330-gyro" }, + { }, }; #endif |