diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2009-01-22 10:03:02 +0100 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2009-01-22 10:03:02 +0100 |
commit | 6552ebae25ffd57574c6e72d17fce67fea08b918 (patch) | |
tree | cde6cc932c7e47d818154b011dfd8a6997d5c18e /drivers/gpio/mcp23s08.c | |
parent | rcu: remove duplicate CONFIG_RCU_CPU_STALL_DETECTOR (diff) | |
parent | debugobjects: add and use INIT_WORK_ON_STACK (diff) | |
download | linux-6552ebae25ffd57574c6e72d17fce67fea08b918.tar.xz linux-6552ebae25ffd57574c6e72d17fce67fea08b918.zip |
Merge branch 'core/debugobjects' into core/urgent
Diffstat (limited to 'drivers/gpio/mcp23s08.c')
-rw-r--r-- | drivers/gpio/mcp23s08.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/gpio/mcp23s08.c b/drivers/gpio/mcp23s08.c index 89c1d222e9d1..f6fae0e50e65 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) |