gpio: mcp23s08: Bug fix of SPI device tree registration.

The chips variable needs to be incremented for each chip that is
found in the spi_present_mask when registering via device tree.
Without this and the checking a negative index is passed to the
data->chip array in a subsequent loop.

Signed-off-by: Michael Welling <>
Acked-by: Peter Korsgaard <>
Signed-off-by: Linus Walleij <>
1 file changed