Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Christophe JAILLET and committed by
Mark Brown
9620ca90 fafd6794

+2 -1
+2 -1
drivers/spi/spi-axi-spi-engine.c
··· 494 494 SPI_ENGINE_VERSION_MAJOR(version), 495 495 SPI_ENGINE_VERSION_MINOR(version), 496 496 SPI_ENGINE_VERSION_PATCH(version)); 497 - return -ENODEV; 497 + ret = -ENODEV; 498 + goto err_put_master; 498 499 } 499 500 500 501 spi_engine->clk = devm_clk_get(&pdev->dev, "s_axi_aclk");