[PATCH 3/3] spi: rockchip: Drop dead zero-check on fifo_len
Mark Brown
broonie at kernel.org
Sun Apr 26 13:36:34 PDT 2026
On Sat, Apr 25, 2026 at 09:29:36AM +0000, John Madieu wrote:
> rs->fifo_len is assigned from get_fifo_len(), which returns 64 for the
> two known SPI controller versions and 32 for everything else - never 0.
> The subsequent
> if (!rs->fifo_len)
> return dev_err_probe(...);
> is therefore unreachable.
> Drop the check. If unknown controller versions ever need to fail probe
> explicitly, that should be expressed in get_fifo_len() itself, not
> through an impossible post-condition.
That looks like it's intended as a "you added a new hardware type and
forgot to fill in this field" type check intended to never fire in
production?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-rockchip/attachments/20260427/82e9a9b3/attachment.sig>
More information about the Linux-rockchip
mailing list