Commit 0f11daf1 authored by Arvind Yadav's avatar Arvind Yadav Committed by Mark Brown

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: default avatarArvind Yadav <arvind.yadav.cs@gmail.com>
Reviewed-by: default avatarKrzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent f5c97c7b
......@@ -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,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment