spi: spi-uclass: Use unwind goto
authorAndrew Goodbody <andrew.goodbody@linaro.org>
Mon, 6 Oct 2025 15:09:25 +0000 (16:09 +0100)
committerTom Rini <trini@konsulko.com>
Tue, 28 Oct 2025 16:33:00 +0000 (10:33 -0600)
commitf12ca3e2b81beef901c182981bb70b0b2aec8f6c
tree50be4b104a0f7fc90cf2f5ec506a65933171735e
parent1e2de3ce615e5cd2bd89d6bd601ed3709059318b
spi: spi-uclass: Use unwind goto

In _spi_get_bus_and_cs the check for stacked parallel support needing
multiple chip select support does a direct return on error. Instead it
should set the error code in ret and then use the unwind goto.

This issue was found by Smatch.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
drivers/spi/spi-uclass.c