spi: rockchip: avoid objtool warning
authorArnd Bergmann <arnd@arndb.de>
Fri, 26 Feb 2021 14:00:48 +0000 (15:00 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 14 May 2021 07:50:09 +0000 (09:50 +0200)
commit82a0cadf6fa5f16e9b9d85f9be9fd20c7b65a152
tree22350b739e4b1eecd8fad0c2fb1a37208be13fad
parenteb949f891226c012138ffd9df90d1e509f428ae6
spi: rockchip: avoid objtool warning

[ Upstream commit e50989527faeafb79f45a0f7529ba8e01dff1fff ]

Building this file with clang leads to a an unreachable code path
causing a warning from objtool:

drivers/spi/spi-rockchip.o: warning: objtool: rockchip_spi_transfer_one()+0x2e0: sibling call from callable instruction with modified stack frame

Change the unreachable() into an error return that can be
handled if it ever happens, rather than silently crashing
the kernel.

Fixes: 65498c6ae241 ("spi: rockchip: support 4bit words")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Pratyush Yadav <p.yadav@ti.com>
Link: https://lore.kernel.org/r/20210226140109.3477093-1-arnd@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/spi/spi-rockchip.c