Commit ef8290ac authored by Michael Welling's avatar Michael Welling Committed by Linus Walleij

gpio: mcp23s08: Eliminates redundant checking.

Unnecessary checking was added during the merge of the gpio branch.
This patch removes the extra unnecessary checking.
Signed-off-by: default avatarMichael Welling <mwelling@ieee.org>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent 7171511e
...@@ -900,8 +900,6 @@ static int mcp23s08_probe(struct spi_device *spi) ...@@ -900,8 +900,6 @@ static int mcp23s08_probe(struct spi_device *spi)
if (spi_present_mask & (1 << addr)) if (spi_present_mask & (1 << addr))
chips++; chips++;
} }
if (!chips)
return -ENODEV;
} else { } else {
type = spi_get_device_id(spi)->driver_data; type = spi_get_device_id(spi)->driver_data;
pdata = dev_get_platdata(&spi->dev); pdata = dev_get_platdata(&spi->dev);
...@@ -940,10 +938,6 @@ static int mcp23s08_probe(struct spi_device *spi) ...@@ -940,10 +938,6 @@ static int mcp23s08_probe(struct spi_device *spi)
if (!(spi_present_mask & (1 << addr))) if (!(spi_present_mask & (1 << addr)))
continue; continue;
chips--; chips--;
if (chips < 0) {
dev_err(&spi->dev, "FATAL: invalid negative chip id\n");
goto fail;
}
data->mcp[addr] = &data->chip[chips]; data->mcp[addr] = &data->chip[chips];
status = mcp23s08_probe_one(data->mcp[addr], &spi->dev, spi, status = mcp23s08_probe_one(data->mcp[addr], &spi->dev, spi,
0x40 | (addr << 1), type, base, 0x40 | (addr << 1), type, base,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment