lkml.org 
[lkml]   [2015]   [Jun]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 2/6] iio: magnetometer: mmc35240: NULL terminate attribute array
Date
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>
---
drivers/iio/magnetometer/mmc35240.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/iio/magnetometer/mmc35240.c b/drivers/iio/magnetometer/mmc35240.c
index 417eca1..9d62c53 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 = {
--
1.9.1


\
 
 \ /
  Last update: 2015-06-03 11:21    [W:0.168 / U:0.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site