summaryrefslogtreecommitdiffstats
path: root/drivers/gpio/max7301.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpio/max7301.c')
-rw-r--r--drivers/gpio/max7301.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/gpio/max7301.c b/drivers/gpio/max7301.c
index 8b24d784db9..3e7f4e06386 100644
--- a/drivers/gpio/max7301.c
+++ b/drivers/gpio/max7301.c
@@ -217,8 +217,10 @@ static int __devinit max7301_probe(struct spi_device *spi)
int i, ret;
pdata = spi->dev.platform_data;
- if (!pdata || !pdata->base)
- return -ENODEV;
+ if (!pdata || !pdata->base) {
+ dev_dbg(&spi->dev, "incorrect or missing platform data\n");
+ return -EINVAL;
+ }
/*
* bits_per_word cannot be configured in platform data