summaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorArvind Yadav <arvind.yadav.cs@gmail.com>2017-07-25 15:44:32 +0530
committerMark Brown <broonie@kernel.org>2017-07-26 13:00:30 +0100
commit0f11daf10b4ac6a6c8ea6b39552f119c595b5406 (patch)
treec1f25eae64660758c062bf4b116c4b548d15a981 /sound
parentf5c97c7b0438bec0aad9738af1baa698dae5bc09 (diff)
downloadop-kernel-dev-0f11daf10b4ac6a6c8ea6b39552f119c595b5406.zip
op-kernel-dev-0f11daf10b4ac6a6c8ea6b39552f119c595b5406.tar.gz
ASoC: samsung: spdif: Handle return value of clk_prepare_enable.
clk_prepare_enable() can fail here and we must check its return value. Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com> Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/samsung/spdif.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/sound/soc/samsung/spdif.c b/sound/soc/samsung/spdif.c
index 779504f..cb59911 100644
--- a/sound/soc/samsung/spdif.c
+++ b/sound/soc/samsung/spdif.c
@@ -391,7 +391,9 @@ static int spdif_probe(struct platform_device *pdev)
ret = -ENOENT;
goto err0;
}
- clk_prepare_enable(spdif->pclk);
+ ret = clk_prepare_enable(spdif->pclk);
+ if (ret)
+ goto err0;
spdif->sclk = devm_clk_get(&pdev->dev, "sclk_spdif");
if (IS_ERR(spdif->sclk)) {
@@ -399,7 +401,9 @@ static int spdif_probe(struct platform_device *pdev)
ret = -ENOENT;
goto err1;
}
- clk_prepare_enable(spdif->sclk);
+ ret = clk_prepare_enable(spdif->sclk);
+ if (ret)
+ goto err1;
/* Request S/PDIF Register's memory region */
if (!request_mem_region(mem_res->start,
OpenPOWER on IntegriCloud