summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>2017-01-09 01:02:47 +0100
committerMark Brown <broonie@kernel.org>2017-01-09 11:20:46 +0000
commit9620ca90115d4bd700f05862d3b210a266a66efe (patch)
tree4d35f3658f3f65aac935d50140d1919d66ba9992
parentfafd67940774733fa97f4b09412aea6981b82e0a (diff)
downloadblackbird-obmc-linux-9620ca90115d4bd700f05862d3b210a266a66efe.tar.gz
blackbird-obmc-linux-9620ca90115d4bd700f05862d3b210a266a66efe.zip
spi: spi-axi: Free resources on error path
We should go to 'err_put_master' here instead of returning directly. Otherwise a call to 'spi_master_put' is missing. Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Acked-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r--drivers/spi/spi-axi-spi-engine.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/spi/spi-axi-spi-engine.c b/drivers/spi/spi-axi-spi-engine.c
index 319225d7e761..6ab4c7700228 100644
--- a/drivers/spi/spi-axi-spi-engine.c
+++ b/drivers/spi/spi-axi-spi-engine.c
@@ -494,7 +494,8 @@ static int spi_engine_probe(struct platform_device *pdev)
SPI_ENGINE_VERSION_MAJOR(version),
SPI_ENGINE_VERSION_MINOR(version),
SPI_ENGINE_VERSION_PATCH(version));
- return -ENODEV;
+ ret = -ENODEV;
+ goto err_put_master;
}
spi_engine->clk = devm_clk_get(&pdev->dev, "s_axi_aclk");
OpenPOWER on IntegriCloud