diff options
author | Christophe JAILLET <christophe.jaillet@wanadoo.fr> | 2017-01-09 01:02:47 +0100 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2017-01-09 12:20:46 +0100 |
commit | 9620ca90115d4bd700f05862d3b210a266a66efe (patch) | |
tree | 4d35f3658f3f65aac935d50140d1919d66ba9992 /drivers/spi/spi-axi-spi-engine.c | |
parent | Merge remote-tracking branches 'spi/topic/spidev', 'spi/topic/sunxi', 'spi/to... (diff) | |
download | linux-9620ca90115d4bd700f05862d3b210a266a66efe.tar.xz 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>
Diffstat (limited to 'drivers/spi/spi-axi-spi-engine.c')
-rw-r--r-- | drivers/spi/spi-axi-spi-engine.c | 3 |
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"); |