Message ID | 20230717145106.28013-1-ruc_gongyuanjun@163.com (mailing list archive) |
---|---|
State | Handled Elsewhere, archived |
Headers | show |
Series | [1/1] sound:soc: fix return value check in imx_audmux_suspend | expand |
Context | Check | Description |
---|---|---|
snowpatch_ozlabs/github-powerpc_sparse | success | Successfully ran 4 jobs. |
snowpatch_ozlabs/github-powerpc_clang | success | Successfully ran 6 jobs. |
snowpatch_ozlabs/github-powerpc_kernel_qemu | fail | boot (ppc64le_guest_defconfig, powernv+p8+tcg, powernv+p9+tcg, qemu-system-ppc64, ppc64le-rootfs.... failed at step Run qemu-powernv+p8+tcg with korg-5.5.0 build kernel. |
On Mon, Jul 17, 2023 at 10:51 PM Yuanjun Gong <ruc_gongyuanjun@163.com> wrote: > check the return value of clk_prepare_enable, and if > clk_prepare_enable got an unexpected return value, > imx_audmux_suspend should return the error value. > > Signed-off-by: Yuanjun Gong <ruc_gongyuanjun@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..962b6baf0a34 100644 > --- a/sound/soc/fsl/imx-audmux.c > +++ b/sound/soc/fsl/imx-audmux.c > @@ -325,8 +325,11 @@ static void imx_audmux_remove(struct platform_device > *pdev) > static int imx_audmux_suspend(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 the two related patches together as one patch. commit subject can use ASoC: imx-audmux: xxxxx best regards wang shengjiu > for (i = 0; i < reg_max; i++) > regcache[i] = readl(audmux_base + i * 4); > -- > 2.17.1 > >
diff --git a/sound/soc/fsl/imx-audmux.c b/sound/soc/fsl/imx-audmux.c index be003a117b39..962b6baf0a34 100644 --- a/sound/soc/fsl/imx-audmux.c +++ b/sound/soc/fsl/imx-audmux.c @@ -325,8 +325,11 @@ static void imx_audmux_remove(struct platform_device *pdev) static int imx_audmux_suspend(struct device *dev) { int i; + ssize_t ret; - clk_prepare_enable(audmux_clk); + ret = clk_prepare_enable(audmux_clk); + if (ret) + return ret; for (i = 0; i < reg_max; i++) regcache[i] = readl(audmux_base + i * 4);
check the return value of clk_prepare_enable, and if clk_prepare_enable got an unexpected return value, imx_audmux_suspend should return the error value. Signed-off-by: Yuanjun Gong <ruc_gongyuanjun@163.com> --- sound/soc/fsl/imx-audmux.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)