commit | 46b24311ccc8b37da9e6e006c6158229a5354268 | [log] [tgz] |
---|---|---|
author | Sascha Hauer <s.hauer@pengutronix.de> | Tue Jul 03 10:55:40 2012 +0200 |
committer | Jonathan Cameron <jic23@kernel.org> | Sun Jul 08 20:02:24 2012 +0100 |
tree | 7ff47f0e57a889c74331e6a903ab2f6acbcedd88 | |
parent | a91aff1c09fc41a55ccaa115763ff77e36b527d3 [diff] |
iio: Fix unitialized use of list The dev_attr list is initialized in __iio_add_event_config_attrs which is called only when indio_dev->channels is true. Nevertheless the list is used unconditionally later in iio_device_register_eventset which results in a NULL pointer exception. To fix this unconditionally initialize the list in iio_device_register_eventset. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>