aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/iio/industrialio-buffer.c
diff options
context:
space:
mode:
authorHartmut Knaack <knaack.h@gmx.de>2014-02-16 06:53:00 -0500
committerJonathan Cameron <jic23@kernel.org>2014-02-18 03:46:36 -0500
commit92825ff97411f0121166485798cdaf2deb6b5952 (patch)
treed410f5fb861d7d128e7fa1287f082f3cb7ac7251 /drivers/iio/industrialio-buffer.c
parentb8a70aef04bf93ba0141008d284ffcdda5883093 (diff)
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-buffer.c')
-rw-r--r--drivers/iio/industrialio-buffer.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/drivers/iio/industrialio-buffer.c b/drivers/iio/industrialio-buffer.c
index c67d83bdc8f0..e108f2a9d827 100644
--- a/drivers/iio/industrialio-buffer.c
+++ b/drivers/iio/industrialio-buffer.c
@@ -264,7 +264,7 @@ static int iio_buffer_add_channel_sysfs(struct iio_dev *indio_dev,
264 &indio_dev->dev, 264 &indio_dev->dev,
265 &buffer->scan_el_dev_attr_list); 265 &buffer->scan_el_dev_attr_list);
266 if (ret) 266 if (ret)
267 goto error_ret; 267 return ret;
268 attrcount++; 268 attrcount++;
269 ret = __iio_add_chan_devattr("type", 269 ret = __iio_add_chan_devattr("type",
270 chan, 270 chan,
@@ -275,7 +275,7 @@ static int iio_buffer_add_channel_sysfs(struct iio_dev *indio_dev,
275 &indio_dev->dev, 275 &indio_dev->dev,
276 &buffer->scan_el_dev_attr_list); 276 &buffer->scan_el_dev_attr_list);
277 if (ret) 277 if (ret)
278 goto error_ret; 278 return ret;
279 attrcount++; 279 attrcount++;
280 if (chan->type != IIO_TIMESTAMP) 280 if (chan->type != IIO_TIMESTAMP)
281 ret = __iio_add_chan_devattr("en", 281 ret = __iio_add_chan_devattr("en",
@@ -296,10 +296,9 @@ static int iio_buffer_add_channel_sysfs(struct iio_dev *indio_dev,
296 &indio_dev->dev, 296 &indio_dev->dev,
297 &buffer->scan_el_dev_attr_list); 297 &buffer->scan_el_dev_attr_list);
298 if (ret) 298 if (ret)
299 goto error_ret; 299 return ret;
300 attrcount++; 300 attrcount++;
301 ret = attrcount; 301 ret = attrcount;
302error_ret:
303 return ret; 302 return ret;
304} 303}
305 304
@@ -553,13 +552,13 @@ static int __iio_update_buffers(struct iio_dev *indio_dev,
553 if (indio_dev->setup_ops->predisable) { 552 if (indio_dev->setup_ops->predisable) {
554 ret = indio_dev->setup_ops->predisable(indio_dev); 553 ret = indio_dev->setup_ops->predisable(indio_dev);
555 if (ret) 554 if (ret)
556 goto error_ret; 555 return ret;
557 } 556 }
558 indio_dev->currentmode = INDIO_DIRECT_MODE; 557 indio_dev->currentmode = INDIO_DIRECT_MODE;
559 if (indio_dev->setup_ops->postdisable) { 558 if (indio_dev->setup_ops->postdisable) {
560 ret = indio_dev->setup_ops->postdisable(indio_dev); 559 ret = indio_dev->setup_ops->postdisable(indio_dev);
561 if (ret) 560 if (ret)
562 goto error_ret; 561 return ret;
563 } 562 }
564 } 563 }
565 /* Keep a copy of current setup to allow roll back */ 564 /* Keep a copy of current setup to allow roll back */
@@ -613,7 +612,7 @@ static int __iio_update_buffers(struct iio_dev *indio_dev,
613 else { 612 else {
614 kfree(compound_mask); 613 kfree(compound_mask);
615 ret = -EINVAL; 614 ret = -EINVAL;
616 goto error_ret; 615 return ret;
617 } 616 }
618 } 617 }
619 } else { 618 } else {
@@ -696,13 +695,10 @@ error_run_postdisable:
696 if (indio_dev->setup_ops->postdisable) 695 if (indio_dev->setup_ops->postdisable)
697 indio_dev->setup_ops->postdisable(indio_dev); 696 indio_dev->setup_ops->postdisable(indio_dev);
698error_remove_inserted: 697error_remove_inserted:
699
700 if (insert_buffer) 698 if (insert_buffer)
701 iio_buffer_deactivate(insert_buffer); 699 iio_buffer_deactivate(insert_buffer);
702 indio_dev->active_scan_mask = old_mask; 700 indio_dev->active_scan_mask = old_mask;
703 kfree(compound_mask); 701 kfree(compound_mask);
704error_ret:
705
706 return ret; 702 return ret;
707} 703}
708 704