X-Git-Url: http://pilppa.org/gitweb/?a=blobdiff_plain;f=drivers%2Fgpio%2Fmcp23s08.c;h=f6fae0e50e654731e2fc235b6d562e2a669b3627;hb=abcea859783f63c9140ebd9fcb69580d0832f2c8;hp=89c1d222e9d10b89b8acc56dbfff0b1933f1a2c3;hpb=ae20a6afec1cf21919d97303f2d8b737eac5acc7;p=linux-2.6-omap-h63xx.git diff --git a/drivers/gpio/mcp23s08.c b/drivers/gpio/mcp23s08.c index 89c1d222e9d..f6fae0e50e6 100644 --- a/drivers/gpio/mcp23s08.c +++ b/drivers/gpio/mcp23s08.c @@ -310,8 +310,10 @@ static int mcp23s08_probe(struct spi_device *spi) unsigned base; pdata = spi->dev.platform_data; - if (!pdata || !gpio_is_valid(pdata->base)) - return -ENODEV; + if (!pdata || !gpio_is_valid(pdata->base)) { + dev_dbg(&spi->dev, "invalid or missing platform data\n"); + return -EINVAL; + } for (addr = 0; addr < 4; addr++) { if (!pdata->chip[addr].is_present)