spi: spi_register_controller(): free bus id on error paths
authorAaro Koskinen <aaro.koskinen@nokia.com>
Wed, 4 Mar 2020 11:17:40 +0000 (13:17 +0200)
committerMark Brown <broonie@kernel.org>
Wed, 4 Mar 2020 14:28:57 +0000 (14:28 +0000)
commitf9981d4f50b475d7dbb70f3022b87a3c8bba9fd6
tree6e86fa62b26407a7ef49117c40e96727c9c38036
parent51bddd4501bc414b8b1e8f4d096b4a5304068169
spi: spi_register_controller(): free bus id on error paths

Some error paths leave the bus id allocated. As a result the IDR
allocation will fail after a deferred probe. Fix by freeing the bus id
always on error.

Signed-off-by: Aaro Koskinen <aaro.koskinen@nokia.com>
Message-Id: <20200304111740.27915-1-aaro.koskinen@nokia.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi.c