Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1051550e authored by Axel Lin's avatar Axel Lin Committed by Mark Brown
Browse files

spi: st-ssc4: Fix missing spi_master_put in spi_st_probe error paths



Signed-off-by: default avatarAxel Lin <axel.lin@ingics.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 83fefd2d
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -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;
}