diff options
author | Navid Emamdoost <navid.emamdoost@gmail.com> | 2019-09-30 22:52:40 +0200 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2019-10-01 19:38:52 +0200 |
commit | d3b0ffa1d75d5305ebe34735598993afbb8a869d (patch) | |
tree | 991c195aa1b2dfa984f0fde403590a6c5aa239fe /drivers/spi/spi-fsl-lpspi.c | |
parent | spi: orion: fix runtime PM initialization (diff) | |
download | linux-d3b0ffa1d75d5305ebe34735598993afbb8a869d.tar.xz linux-d3b0ffa1d75d5305ebe34735598993afbb8a869d.zip |
spi: gpio: prevent memory leak in spi_gpio_probe
In spi_gpio_probe an SPI master is allocated via spi_alloc_master, but
this controller should be released if devm_add_action_or_reset fails,
otherwise memory leaks. In order to avoid leak spi_contriller_put must
be called in case of failure for devm_add_action_or_reset.
Fixes: 8b797490b4db ("spi: gpio: Make sure spi_master_put() is called in every error path")
Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com>
Link: https://lore.kernel.org/r/20190930205241.5483-1-navid.emamdoost@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/spi/spi-fsl-lpspi.c')
0 files changed, 0 insertions, 0 deletions