Skip to content
Unverified Commit 8b797490 authored by Andrey Smirnov's avatar Andrey Smirnov Committed by Mark Brown
Browse files

spi: gpio: Make sure spi_master_put() is called in every error path



There's a number of failure paths in spi_gpio_probe() that do not call
spi_master_put() potentially leaking memory. Fix this problem by
registering a cleanup funciont via devm_add_action_or_reset() right
after SPI controller is allocated.

Signed-off-by: default avatarAndrey Smirnov <andrew.smirnov@gmail.com>
Cc: Mark Brown <broonie@kernel.org>
Cc: Chris Healy <cphealy@gmail.com>
Cc: linux-spi@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 8b57b11b
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment