Re: [PATCH 32/40] iio: adc: ti_am335x_adc: Get rid of useless gotos

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 25 Aug 2021 17:25:10 +0200
Miquel Raynal <miquel.raynal@xxxxxxxxxxx> wrote:

> Gotos jumping to a return statement are not really useful, drop them.
> 
> Signed-off-by: Miquel Raynal <miquel.raynal@xxxxxxxxxxx>
Acked-by: Jonathan Cameron <Jonathan.Cameron@xxxxxxxxxx>

> ---
>  drivers/iio/adc/ti_am335x_adc.c | 7 +++----
>  1 file changed, 3 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/iio/adc/ti_am335x_adc.c b/drivers/iio/adc/ti_am335x_adc.c
> index dd2200d2f214..00bbf557e86c 100644
> --- a/drivers/iio/adc/ti_am335x_adc.c
> +++ b/drivers/iio/adc/ti_am335x_adc.c
> @@ -616,11 +616,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);
>  
> @@ -632,8 +632,7 @@ static int tiadc_probe(struct platform_device *pdev)
>  
>  err_dma:
>  	iio_device_unregister(indio_dev);
> -err_buffer_unregister:
> -err_free_channels:
> +
>  	return err;
>  }
>  




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux