Commit 65ed0a8d authored by Dan Carpenter's avatar Dan Carpenter Committed by Mark Brown

ASoC: sti: Fix error handling if of_clk_get() fails

We intended to return here.  The current code has a static checker
warning because we set "ret" but don't use it.

Fixes: 76c2145d ("ASoC: sti: Add CPU DAI driver for playback")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Acked-by: default avatarArnaud POULIQUEN <arnaud.pouliquen@st.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent d05d862e
......@@ -1074,7 +1074,7 @@ int uni_player_init(struct platform_device *pdev,
player->clk = of_clk_get(pdev->dev.of_node, 0);
if (IS_ERR(player->clk)) {
dev_err(player->dev, "Failed to get clock\n");
ret = PTR_ERR(player->clk);
return PTR_ERR(player->clk);
}
/* Select the frequency synthesizer clock */
......
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