Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc
[linux-2.6-microblaze.git] / drivers / gpio / max7301.c
index 8b24d78..3e7f4e0 100644 (file)
@@ -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