diff mbox series

iio: dac: vf610: Fix an error handling path in 'vf610_dac_probe()'

Message ID 20200426194403.41913-1-christophe.jaillet@wanadoo.fr (mailing list archive)
State New, archived
Headers show
Series iio: dac: vf610: Fix an error handling path in 'vf610_dac_probe()' | expand

Commit Message

Christophe JAILLET April 26, 2020, 7:44 p.m. UTC
A call to 'vf610_dac_exit()' is missing in an error handling path.

Fixes: 1b983bf42fad ("iio: dac: vf610_dac: Add IIO DAC driver for Vybrid SoC")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
Un-tested.
Proposal based on function names and functions called in the remove function
---
 drivers/iio/dac/vf610_dac.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Jonathan Cameron May 2, 2020, 6:17 p.m. UTC | #1
On Sun, 26 Apr 2020 21:44:03 +0200
Christophe JAILLET <christophe.jaillet@wanadoo.fr> wrote:

> A call to 'vf610_dac_exit()' is missing in an error handling path.
> 
> Fixes: 1b983bf42fad ("iio: dac: vf610_dac: Add IIO DAC driver for Vybrid SoC")
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>

I'll count this one as 'obviously' correct, though happy to have input
from sanchayan if possible.

Applied to the fixes-togreg branch of iio.git and marked for stable.

Thanks,

Jonathan

> ---
> Un-tested.
> Proposal based on function names and functions called in the remove function
> ---
>  drivers/iio/dac/vf610_dac.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/iio/dac/vf610_dac.c b/drivers/iio/dac/vf610_dac.c
> index 71f8a5c471c4..7f1e9317c3f3 100644
> --- a/drivers/iio/dac/vf610_dac.c
> +++ b/drivers/iio/dac/vf610_dac.c
> @@ -223,6 +223,7 @@ static int vf610_dac_probe(struct platform_device *pdev)
>  	return 0;
>  
>  error_iio_device_register:
> +	vf610_dac_exit(info);
>  	clk_disable_unprepare(info->clk);
>  
>  	return ret;
diff mbox series

Patch

diff --git a/drivers/iio/dac/vf610_dac.c b/drivers/iio/dac/vf610_dac.c
index 71f8a5c471c4..7f1e9317c3f3 100644
--- a/drivers/iio/dac/vf610_dac.c
+++ b/drivers/iio/dac/vf610_dac.c
@@ -223,6 +223,7 @@  static int vf610_dac_probe(struct platform_device *pdev)
 	return 0;
 
 error_iio_device_register:
+	vf610_dac_exit(info);
 	clk_disable_unprepare(info->clk);
 
 	return ret;