diff options
author | Christophe JAILLET <christophe.jaillet@wanadoo.fr> | 2017-01-09 03:02:47 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2017-01-09 14:20:46 +0300 |
commit | 9620ca90115d4bd700f05862d3b210a266a66efe (patch) | |
tree | 4d35f3658f3f65aac935d50140d1919d66ba9992 /drivers/spi/spi-axi-spi-engine.c | |
parent | fafd67940774733fa97f4b09412aea6981b82e0a (diff) | |
download | linux-9620ca90115d4bd700f05862d3b210a266a66efe.tar.xz |
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"); |