aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/iio/industrialio-event.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-event.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-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,
366 ret = iio_device_add_event(indio_dev, chan, i, type, dir, 366 ret = iio_device_add_event(indio_dev, chan, i, type, dir,
367 IIO_SEPARATE, &chan->event_spec[i].mask_separate); 367 IIO_SEPARATE, &chan->event_spec[i].mask_separate);
368 if (ret < 0) 368 if (ret < 0)
369 goto error_ret; 369 return ret;
370 attrcount += ret; 370 attrcount += ret;
371 371
372 ret = iio_device_add_event(indio_dev, chan, i, type, dir, 372 ret = iio_device_add_event(indio_dev, chan, i, type, dir,
373 IIO_SHARED_BY_TYPE, 373 IIO_SHARED_BY_TYPE,
374 &chan->event_spec[i].mask_shared_by_type); 374 &chan->event_spec[i].mask_shared_by_type);
375 if (ret < 0) 375 if (ret < 0)
376 goto error_ret; 376 return ret;
377 attrcount += ret; 377 attrcount += ret;
378 378
379 ret = iio_device_add_event(indio_dev, chan, i, type, dir, 379 ret = iio_device_add_event(indio_dev, chan, i, type, dir,
380 IIO_SHARED_BY_DIR, 380 IIO_SHARED_BY_DIR,
381 &chan->event_spec[i].mask_shared_by_dir); 381 &chan->event_spec[i].mask_shared_by_dir);
382 if (ret < 0) 382 if (ret < 0)
383 goto error_ret; 383 return ret;
384 attrcount += ret; 384 attrcount += ret;
385 385
386 ret = iio_device_add_event(indio_dev, chan, i, type, dir, 386 ret = iio_device_add_event(indio_dev, chan, i, type, dir,
387 IIO_SHARED_BY_ALL, 387 IIO_SHARED_BY_ALL,
388 &chan->event_spec[i].mask_shared_by_all); 388 &chan->event_spec[i].mask_shared_by_all);
389 if (ret < 0) 389 if (ret < 0)
390 goto error_ret; 390 return ret;
391 attrcount += ret; 391 attrcount += ret;
392 } 392 }
393 ret = attrcount; 393 ret = attrcount;
394error_ret:
395 return ret; 394 return ret;
396} 395}
397 396
@@ -440,10 +439,8 @@ int iio_device_register_eventset(struct iio_dev *indio_dev)
440 439
441 indio_dev->event_interface = 440 indio_dev->event_interface =
442 kzalloc(sizeof(struct iio_event_interface), GFP_KERNEL); 441 kzalloc(sizeof(struct iio_event_interface), GFP_KERNEL);
443 if (indio_dev->event_interface == NULL) { 442 if (indio_dev->event_interface == NULL)
444 ret = -ENOMEM; 443 return -ENOMEM;
445 goto error_ret;
446 }
447 444
448 INIT_LIST_HEAD(&indio_dev->event_interface->dev_attr_list); 445 INIT_LIST_HEAD(&indio_dev->event_interface->dev_attr_list);
449 446
@@ -489,8 +486,6 @@ int iio_device_register_eventset(struct iio_dev *indio_dev)
489error_free_setup_event_lines: 486error_free_setup_event_lines:
490 iio_free_chan_devattr_list(&indio_dev->event_interface->dev_attr_list); 487 iio_free_chan_devattr_list(&indio_dev->event_interface->dev_attr_list);
491 kfree(indio_dev->event_interface); 488 kfree(indio_dev->event_interface);
492error_ret:
493
494 return ret; 489 return ret;
495} 490}
496 491