RE: [PATCH] ASoC: sh: rz-ssi: Improve error handling in rz_ssi_probe() error path

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

 



Hi All,

> Biju Das <biju.das@xxxxxxxxxxxxxx>; linux-renesas-soc@xxxxxxxxxxxxxxx;
> Pavel Machek <pavel@xxxxxxx>
> Subject: [PATCH] ASoC: sh: rz-ssi: Improve error handling in
> rz_ssi_probe() error path
> 
> We usually do cleanup in reverse order of init. Currently in case of
> error rz_ssi_release_dma_channels() done in the reverse order. This
> patch improves error handling in rz_ssi_probe() error path.
> 
> While at it, use "goto cleanup" style to reduce code duplication.
> 
> Reported-by: Pavel Machek <pavel@xxxxxxx>
> Signed-off-by: Biju Das <biju.das.jz@xxxxxxxxxxxxxx>
> ---
>  sound/soc/sh/rz-ssi.c | 26 +++++++++++++++-----------
>  1 file changed, 15 insertions(+), 11 deletions(-)
> 
> diff --git a/sound/soc/sh/rz-ssi.c b/sound/soc/sh/rz-ssi.c index
> 0d0594a0e4f6..c08ef317e3e3 100644
> --- a/sound/soc/sh/rz-ssi.c
> +++ b/sound/soc/sh/rz-ssi.c
> @@ -1017,32 +1017,36 @@ static int rz_ssi_probe(struct platform_device
> *pdev)
> 
>  	ssi->rstc = devm_reset_control_get_exclusive(&pdev->dev, NULL);
>  	if (IS_ERR(ssi->rstc)) {
> -		rz_ssi_release_dma_channels(ssi);
> -		return PTR_ERR(ssi->rstc);
> +		ret = PTR_ERR(ssi->rstc);
> +		goto err_dma;

This label needs to be changed to err_reset.
Will send V2.

Cheers,
Biju




[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Pulse Audio]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux