aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpio/mcp23s08.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpio/mcp23s08.c')
-rw-r--r--drivers/gpio/mcp23s08.c6
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)
310 unsigned base; 310 unsigned base;
311 311
312 pdata = spi->dev.platform_data; 312 pdata = spi->dev.platform_data;
313 if (!pdata || !gpio_is_valid(pdata->base)) 313 if (!pdata || !gpio_is_valid(pdata->base)) {
314 return -ENODEV; 314 dev_dbg(&spi->dev, "invalid or missing platform data\n");
315 return -EINVAL;
316 }
315 317
316 for (addr = 0; addr < 4; addr++) { 318 for (addr = 0; addr < 4; addr++) {
317 if (!pdata->chip[addr].is_present) 319 if (!pdata->chip[addr].is_present)