diff options
author | Hartmut Knaack <knaack.h@gmx.de> | 2014-02-16 11:53:00 +0000 |
---|---|---|
committer | Jonathan Cameron <jic23@kernel.org> | 2014-02-18 08:46:36 +0000 |
commit | 92825ff97411f0121166485798cdaf2deb6b5952 (patch) | |
tree | d410f5fb861d7d128e7fa1287f082f3cb7ac7251 /drivers/iio/industrialio-event.c | |
parent | b8a70aef04bf93ba0141008d284ffcdda5883093 (diff) | |
download | op-kernel-dev-92825ff97411f0121166485798cdaf2deb6b5952.zip op-kernel-dev-92825ff97411f0121166485798cdaf2deb6b5952.tar.gz |
iio get rid of unneccessary error_ret
Get rid of obsolete uses of goto error_ret and some empty lines.
Signed-off-by: Hartmut Knaack <knaack.h@gmx.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'drivers/iio/industrialio-event.c')
-rw-r--r-- | drivers/iio/industrialio-event.c | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/drivers/iio/industrialio-event.c b/drivers/iio/industrialio-event.c index c9c1419..2e6f8e0 100644 --- a/drivers/iio/industrialio-event.c +++ b/drivers/iio/industrialio-event.c @@ -366,32 +366,31 @@ static int iio_device_add_event_sysfs(struct iio_dev *indio_dev, ret = iio_device_add_event(indio_dev, chan, i, type, dir, IIO_SEPARATE, &chan->event_spec[i].mask_separate); if (ret < 0) - goto error_ret; + return ret; attrcount += ret; ret = iio_device_add_event(indio_dev, chan, i, type, dir, IIO_SHARED_BY_TYPE, &chan->event_spec[i].mask_shared_by_type); if (ret < 0) - goto error_ret; + return ret; attrcount += ret; ret = iio_device_add_event(indio_dev, chan, i, type, dir, IIO_SHARED_BY_DIR, &chan->event_spec[i].mask_shared_by_dir); if (ret < 0) - goto error_ret; + return ret; attrcount += ret; ret = iio_device_add_event(indio_dev, chan, i, type, dir, IIO_SHARED_BY_ALL, &chan->event_spec[i].mask_shared_by_all); if (ret < 0) - goto error_ret; + return ret; attrcount += ret; } ret = attrcount; -error_ret: return ret; } @@ -440,10 +439,8 @@ int iio_device_register_eventset(struct iio_dev *indio_dev) indio_dev->event_interface = kzalloc(sizeof(struct iio_event_interface), GFP_KERNEL); - if (indio_dev->event_interface == NULL) { - ret = -ENOMEM; - goto error_ret; - } + if (indio_dev->event_interface == NULL) + return -ENOMEM; INIT_LIST_HEAD(&indio_dev->event_interface->dev_attr_list); @@ -489,8 +486,6 @@ int iio_device_register_eventset(struct iio_dev *indio_dev) error_free_setup_event_lines: iio_free_chan_devattr_list(&indio_dev->event_interface->dev_attr_list); kfree(indio_dev->event_interface); -error_ret: - return ret; } |