diff options
Diffstat (limited to 'drivers/gpio/max732x.c')
-rw-r--r-- | drivers/gpio/max732x.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/gpio/max732x.c b/drivers/gpio/max732x.c index 55ae9a41897..f7868243af8 100644 --- a/drivers/gpio/max732x.c +++ b/drivers/gpio/max732x.c @@ -267,8 +267,10 @@ static int __devinit max732x_probe(struct i2c_client *client, int ret, nr_port; pdata = client->dev.platform_data; - if (pdata == NULL) - return -ENODEV; + if (pdata == NULL) { + dev_dbg(&client->dev, "no platform data\n"); + return -EINVAL; + } chip = kzalloc(sizeof(struct max732x_chip), GFP_KERNEL); if (chip == NULL) |