[PATCH 1/1] sound:soc: fix return value check in imx_audmux_resume
Shengjiu Wang
shengjiu.wang at gmail.com
Fri Jul 21 18:56:48 AEST 2023
On Mon, Jul 17, 2023 at 10:51 PM Yuanjun Gong <ruc_gongyuanjun at 163.com>
wrote:
> check the return value of clk_prepare_enable, and if
> clk_prepare_enable got an unexpected return value,
> imx_audmux_resume should return the error value.
>
> Signed-off-by: Yuanjun Gong <ruc_gongyuanjun at 163.com>
> ---
> sound/soc/fsl/imx-audmux.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/sound/soc/fsl/imx-audmux.c b/sound/soc/fsl/imx-audmux.c
> index be003a117b39..e8a3a1baf18d 100644
> --- a/sound/soc/fsl/imx-audmux.c
> +++ b/sound/soc/fsl/imx-audmux.c
> @@ -339,8 +339,11 @@ static int imx_audmux_suspend(struct device *dev)
> static int imx_audmux_resume(struct device *dev)
> {
> int i;
> + ssize_t ret;
>
> - clk_prepare_enable(audmux_clk);
> + ret = clk_prepare_enable(audmux_clk);
> + if (ret)
> + return ret;
>
Please combine this with another one patch.
best regards
wang shengjiu
>
> for (i = 0; i < reg_max; i++)
> writel(regcache[i], audmux_base + i * 4);
> --
> 2.17.1
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20230721/6469fec0/attachment-0001.htm>
More information about the Linuxppc-dev
mailing list