* [PATCH] ASoC: imx-ssi: Check the return value from clk_prepare_enable()
@ 2013-12-04 22:27 Fabio Estevam
2013-12-05 0:01 ` Mark Brown
0 siblings, 1 reply; 2+ messages in thread
From: Fabio Estevam @ 2013-12-04 22:27 UTC (permalink / raw)
To: broonie; +Cc: Fabio Estevam, alsa-devel
From: Fabio Estevam <fabio.estevam@freescale.com>
clk_prepare_enable() may fail, so let's check its return value and propagate it
in the case of error.
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
sound/soc/fsl/imx-ssi.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/sound/soc/fsl/imx-ssi.c b/sound/soc/fsl/imx-ssi.c
index 6336757..df552fa 100644
--- a/sound/soc/fsl/imx-ssi.c
+++ b/sound/soc/fsl/imx-ssi.c
@@ -535,7 +535,9 @@ static int imx_ssi_probe(struct platform_device *pdev)
ret);
goto failed_clk;
}
- clk_prepare_enable(ssi->clk);
+ ret = clk_prepare_enable(ssi->clk);
+ if (ret)
+ goto failed_clk;
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
ssi->base = devm_ioremap_resource(&pdev->dev, res);
--
1.8.1.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] ASoC: imx-ssi: Check the return value from clk_prepare_enable()
2013-12-04 22:27 [PATCH] ASoC: imx-ssi: Check the return value from clk_prepare_enable() Fabio Estevam
@ 2013-12-05 0:01 ` Mark Brown
0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2013-12-05 0:01 UTC (permalink / raw)
To: Fabio Estevam; +Cc: Fabio Estevam, alsa-devel
[-- Attachment #1.1: Type: text/plain, Size: 249 bytes --]
On Wed, Dec 04, 2013 at 08:27:44PM -0200, Fabio Estevam wrote:
> From: Fabio Estevam <fabio.estevam@freescale.com>
>
> clk_prepare_enable() may fail, so let's check its return value and propagate it
> in the case of error.
Applied, thanks.
[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
[-- Attachment #2: Type: text/plain, Size: 0 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-12-05 0:01 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-04 22:27 [PATCH] ASoC: imx-ssi: Check the return value from clk_prepare_enable() Fabio Estevam
2013-12-05 0:01 ` Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).