Home
last modified time | relevance | path

Searched hist:"5 b8c8846" (Results 1 – 1 of 1) sorted by relevance

/openbmc/linux/drivers/spi/
H A Dspi-sc18is602.c5b8c8846 Mon Dec 07 02:17:11 CST 2020 Lukas Wunner <lukas@wunner.de> spi: sc18is602: Don't leak SPI master in probe error path

If the call to devm_gpiod_get_optional() fails on probe of the NXP
SC18IS602/603 SPI driver, the spi_master struct is erroneously not freed.

Fix by switching over to the new devm_spi_alloc_master() helper.

Fixes: f99008013e19 ("spi: sc18is602: Add reset control via gpio pin.")
Signed-off-by: Lukas Wunner <lukas@wunner.de>
Cc: <stable@vger.kernel.org> # v4.9+: 5e844cc37a5c: spi: Introduce device-managed SPI controller allocation
Cc: <stable@vger.kernel.org> # v4.9+
Cc: Phil Reid <preid@electromag.com.au>
Link: https://lore.kernel.org/r/d5f715527b894b91d530fe11a86f51b3184a4e1a.1607286887.git.lukas@wunner.de
Signed-off-by: Mark Brown <broonie@kernel.org>