|
@@ -188,8 +188,10 @@ static int pcf857x_probe(struct i2c_client *client,
|
|
|
int status;
|
|
|
|
|
|
pdata = client->dev.platform_data;
|
|
|
- if (!pdata)
|
|
|
- return -ENODEV;
|
|
|
+ if (!pdata) {
|
|
|
+ dev_dbg(&client->dev, "no platform data\n");
|
|
|
+ return -EINVAL;
|
|
|
+ }
|
|
|
|
|
|
/* Allocate, initialize, and register this gpio_chip. */
|
|
|
gpio = kzalloc(sizeof *gpio, GFP_KERNEL);
|
|
@@ -248,8 +250,10 @@ static int pcf857x_probe(struct i2c_client *client,
|
|
|
else
|
|
|
status = i2c_read_le16(client);
|
|
|
|
|
|
- } else
|
|
|
- status = -ENODEV;
|
|
|
+ } else {
|
|
|
+ dev_dbg(&client->dev, "unsupported number of gpios\n");
|
|
|
+ status = -EINVAL;
|
|
|
+ }
|
|
|
|
|
|
if (status < 0)
|
|
|
goto fail;
|