Skip to contentSkip to conversation

ASoC: imx-ssi: Check the return value from clk_prepare_enable()

PATCH Applied Fabio Estevam 2 participants 2 messages Dec 4, 2013 – Dec 5, 2013

Subsystems (4)
lore
Share & tools
lore

Fabio Estevam

author reviewer
#0 lore raw

PATCH 1/1 ASoC: imx-ssi: Check the return value from clk_prepare_enable()

From: Fabio Estevam <[email protected]>

clk_prepare_enable() may fail, so let's check its return value and propagate it in the case of error.

---
 sound/soc/fsl/imx-ssi.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
sound/soc/fsl/imx-ssi.c +3 -1
index 6336757..df552fa 100644
@@ -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);
Signature · 1 line
1.8.1.2
maintainer Applied
#1 lore raw
Quoted 4 lines · Fabio Estevam

From: Fabio Estevam <[email protected]>

clk_prepare_enable() may fail, so let's check its return value and propagate it in the case of error.

Applied, thanks.