Merge tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
[deliverable/linux.git] / drivers / spi / spi-st-ssc4.c
index f17c0abe299f418697774fa9351e724600442d51..d5adf9f31602385e764f50980dd93786812967b6 100644 (file)
@@ -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;
 }
 
This page took 0.041481 seconds and 5 git commands to generate.