Skip to content

Commit

Permalink
gpio: mcp23s08: Eliminates redundant checking.
Browse files Browse the repository at this point in the history
Unnecessary checking was added during the merge of the gpio branch.
This patch removes the extra unnecessary checking.

Signed-off-by: Michael Welling <mwelling@ieee.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
  • Loading branch information
Michael Welling authored and Linus Walleij committed Jul 4, 2014
1 parent 7171511 commit ef8290a
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions drivers/gpio/gpio-mcp23s08.c
Original file line number Diff line number Diff line change
Expand Up @@ -900,8 +900,6 @@ static int mcp23s08_probe(struct spi_device *spi)
if (spi_present_mask & (1 << addr))
chips++;
}
if (!chips)
return -ENODEV;
} else {
type = spi_get_device_id(spi)->driver_data;
pdata = dev_get_platdata(&spi->dev);
Expand Down Expand Up @@ -940,10 +938,6 @@ static int mcp23s08_probe(struct spi_device *spi)
if (!(spi_present_mask & (1 << addr)))
continue;
chips--;
if (chips < 0) {
dev_err(&spi->dev, "FATAL: invalid negative chip id\n");
goto fail;
}
data->mcp[addr] = &data->chip[chips];
status = mcp23s08_probe_one(data->mcp[addr], &spi->dev, spi,
0x40 | (addr << 1), type, base,
Expand Down

0 comments on commit ef8290a

Please sign in to comment.