summaryrefslogtreecommitdiffstats
path: root/drivers/iio/magnetometer
diff options
context:
space:
mode:
authorDaniel Baluta <daniel.baluta@intel.com>2015-06-05 13:03:11 +0200
committerJonathan Cameron <jic23@kernel.org>2015-06-07 17:33:12 +0200
commitbd35a214f56158d11e46c4a9d8436139f58e7099 (patch)
treece5d0b5fa679c51d45dfb564dfbd7cdc1e2de154 /drivers/iio/magnetometer
parentiio: magnetometer: mmc35240: i2c device name should be lower case (diff)
downloadlinux-bd35a214f56158d11e46c4a9d8436139f58e7099.tar.xz
linux-bd35a214f56158d11e46c4a9d8436139f58e7099.zip
iio: magnetometer: mmc35240: NULL terminate attribute array
This avoid nasty crashes when registering the IIO device. Fixes: abeb6b1e7b ("iio: magnetometer: Add support for MEMSIC MMC35240") Signed-off-by: Daniel Baluta <daniel.baluta@intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'drivers/iio/magnetometer')
-rw-r--r--drivers/iio/magnetometer/mmc35240.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/iio/magnetometer/mmc35240.c b/drivers/iio/magnetometer/mmc35240.c
index d8cf5a6f9291..78da0d15c8eb 100644
--- a/drivers/iio/magnetometer/mmc35240.c
+++ b/drivers/iio/magnetometer/mmc35240.c
@@ -125,6 +125,7 @@ static const struct iio_chan_spec mmc35240_channels[] = {
static struct attribute *mmc35240_attributes[] = {
&iio_const_attr_sampling_frequency_available.dev_attr.attr,
+ NULL
};
static const struct attribute_group mmc35240_attribute_group = {