summaryrefslogtreecommitdiff
path: root/drivers/iio
diff options
context:
space:
mode:
authorMiquel Raynal <miquel.raynal@bootlin.com>2021-10-15 10:14:59 +0200
committerLee Jones <lee.jones@linaro.org>2021-10-21 09:23:57 +0100
commit16e8f8fed48e6089a80ad5de8ac71a1ad0569888 (patch)
tree00425360755ff01e69ec0ba9972cb8715e057565 /drivers/iio
parent9cac0a02266ae2ecfaadb7651c01549c82e98fc4 (diff)
iio: adc: ti_am335x_adc: Get rid of useless gotos
Gotos jumping to a return statement are not really useful, drop them. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Acked-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Signed-off-by: Lee Jones <lee.jones@linaro.org> Link: https://lore.kernel.org/r/20211015081506.933180-42-miquel.raynal@bootlin.com
Diffstat (limited to 'drivers/iio')
-rw-r--r--drivers/iio/adc/ti_am335x_adc.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/iio/adc/ti_am335x_adc.c b/drivers/iio/adc/ti_am335x_adc.c
index 496603ab7841..aa151d702a14 100644
--- a/drivers/iio/adc/ti_am335x_adc.c
+++ b/drivers/iio/adc/ti_am335x_adc.c
@@ -636,11 +636,11 @@ static int tiadc_probe(struct platform_device *pdev)
IRQF_SHARED,
&tiadc_buffer_setup_ops);
if (err)
- goto err_free_channels;
+ return err;
err = iio_device_register(indio_dev);
if (err)
- goto err_buffer_unregister;
+ return err;
platform_set_drvdata(pdev, indio_dev);
@@ -652,8 +652,7 @@ static int tiadc_probe(struct platform_device *pdev)
err_dma:
iio_device_unregister(indio_dev);
-err_buffer_unregister:
-err_free_channels:
+
return err;
}