diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-07-16 05:46:51 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-07-16 05:46:51 +0200 |
commit | d7b6e53e326e18f4124e121ee5b0a138a6bc9a1b (patch) | |
tree | f3ec31c1f3b6a0f114e309779200f62f21421289 | |
parent | Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/msz... (diff) | |
parent | gpio: mcp23s08: Eliminates redundant checking. (diff) | |
download | linux-d7b6e53e326e18f4124e121ee5b0a138a6bc9a1b.tar.xz linux-d7b6e53e326e18f4124e121ee5b0a138a6bc9a1b.zip |
Merge tag 'gpio-v3.16-3' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio
Pull GPIO fix from Linus Walleij:
"Fix up some merge confusion from the merge window"
* tag 'gpio-v3.16-3' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio:
gpio: mcp23s08: Eliminates redundant checking.
-rw-r--r-- | drivers/gpio/gpio-mcp23s08.c | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/drivers/gpio/gpio-mcp23s08.c b/drivers/gpio/gpio-mcp23s08.c index fe7c0e211f9a..57adbc90fdad 100644 --- a/drivers/gpio/gpio-mcp23s08.c +++ b/drivers/gpio/gpio-mcp23s08.c @@ -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); @@ -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, |