Re: [PATCH v2] ASoC: fsi: Add check for clk_enable

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

 



Hi Jiasheng

Thank you for your patch

> As the potential failure of the clk_enable(),
> it should be better to check it and return error
> if fails.
> 
> Fixes: ab6f6d85210c ("ASoC: fsi: add master clock control functions")
> Signed-off-by: Jiasheng Jiang <jiasheng@xxxxxxxxxxx>
(snip)
> +		if (ret)
> +			goto err;
> +		ret = clk_enable(clock->ick);
> +		if (ret)
> +			goto disable_xck;
> +		ret = clk_enable(clock->div);
> +		if (ret)
> +			goto disable_ick;
>
>  		clock->count++;
>  	}
>  
>  	return ret;
> +
> +disable_xck:
> +	clk_disable(clock->xck);
> +disable_ick:
> +	clk_disable(clock->ick);
> +err:
> +	return ret;
>  }

I think disable_ick() / disable_xck() order are inverted ?

Thank you for your help !!

Best regards
---
Kuninori Morimoto



[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux