summaryrefslogtreecommitdiff
path: root/drivers/spi/spi-st-ssc4.c
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@ingics.com>2016-04-29 08:39:38 +0300
committerMark Brown <broonie@kernel.org>2016-04-29 20:16:25 +0300
commit1051550e9d2d3550e7c17cd563b908638833979d (patch)
treeddc50e64f8e481369f3bbc1fdf9b7c9223a40642 /drivers/spi/spi-st-ssc4.c
parent83fefd2d5bec94de765305d44633c42371360a2a (diff)
downloadlinux-1051550e9d2d3550e7c17cd563b908638833979d.tar.xz
spi: st-ssc4: Fix missing spi_master_put in spi_st_probe error paths
Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/spi/spi-st-ssc4.c')
-rw-r--r--drivers/spi/spi-st-ssc4.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/spi/spi-st-ssc4.c b/drivers/spi/spi-st-ssc4.c
index f17c0abe299f..d5adf9f31602 100644
--- a/drivers/spi/spi-st-ssc4.c
+++ b/drivers/spi/spi-st-ssc4.c
@@ -345,12 +345,13 @@ static int spi_st_probe(struct platform_device *pdev)
spi_st->clk = devm_clk_get(&pdev->dev, "ssc");
if (IS_ERR(spi_st->clk)) {
dev_err(&pdev->dev, "Unable to request clock\n");
- return PTR_ERR(spi_st->clk);
+ ret = PTR_ERR(spi_st->clk);
+ goto put_master;
}
ret = spi_st_clk_enable(spi_st);
if (ret)
- return ret;
+ goto put_master;
init_completion(&spi_st->done);
@@ -408,7 +409,8 @@ static int spi_st_probe(struct platform_device *pdev)
clk_disable:
spi_st_clk_disable(spi_st);
-
+put_master:
+ spi_master_put(master);
return ret;
}