ASoC: sti: Fix error handling if of_clk_get() fails
authorDan Carpenter <dan.carpenter@oracle.com>
Fri, 28 Apr 2017 13:22:10 +0000 (16:22 +0300)
committerMark Brown <broonie@kernel.org>
Sun, 30 Apr 2017 12:30:52 +0000 (21:30 +0900)
We intended to return here.  The current code has a static checker
warning because we set "ret" but don't use it.

Fixes: 76c2145ded6b ("ASoC: sti: Add CPU DAI driver for playback")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Arnaud POULIQUEN <arnaud.pouliquen@st.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/sti/uniperif_player.c

index d7e8dd46d2cc40ba2c937a4ea627f4859fe1f478..d8b6936e544e3c9e42444130f9087dc31be73357 100644 (file)
@@ -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 */