summaryrefslogtreecommitdiffstats
path: root/drivers/iio/industrialio-event.c
diff options
context:
space:
mode:
authorHartmut Knaack <knaack.h@gmx.de>2014-02-16 11:53:00 +0000
committerJonathan Cameron <jic23@kernel.org>2014-02-18 08:46:36 +0000
commit92825ff97411f0121166485798cdaf2deb6b5952 (patch)
treed410f5fb861d7d128e7fa1287f082f3cb7ac7251 /drivers/iio/industrialio-event.c
parentb8a70aef04bf93ba0141008d284ffcdda5883093 (diff)
downloadlinux-92825ff97411f0121166485798cdaf2deb6b5952.tar.gz
linux-92825ff97411f0121166485798cdaf2deb6b5952.tar.bz2
linux-92825ff97411f0121166485798cdaf2deb6b5952.zip
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.c17
1 files changed, 6 insertions, 11 deletions
diff --git a/drivers/iio/industrialio-event.c b/drivers/iio/industrialio-event.c
index c9c1419fe6e0..2e6f8e026fab 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;
}