diff options
| -rw-r--r-- | drivers/hid/i2c-hid/i2c-hid.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/hid/i2c-hid/i2c-hid.c b/drivers/hid/i2c-hid/i2c-hid.c index cf71c33ac2b2..c5ad918e36e3 100644 --- a/drivers/hid/i2c-hid/i2c-hid.c +++ b/drivers/hid/i2c-hid/i2c-hid.c | |||
| @@ -1060,6 +1060,14 @@ static int i2c_hid_probe(struct i2c_client *client, | |||
| 1060 | pm_runtime_enable(&client->dev); | 1060 | pm_runtime_enable(&client->dev); |
| 1061 | device_enable_async_suspend(&client->dev); | 1061 | device_enable_async_suspend(&client->dev); |
| 1062 | 1062 | ||
| 1063 | /* Make sure there is something at this address */ | ||
| 1064 | ret = i2c_smbus_read_byte(client); | ||
| 1065 | if (ret < 0) { | ||
| 1066 | dev_dbg(&client->dev, "nothing at this address: %d\n", ret); | ||
| 1067 | ret = -ENXIO; | ||
| 1068 | goto err_pm; | ||
| 1069 | } | ||
| 1070 | |||
| 1063 | ret = i2c_hid_fetch_hid_descriptor(ihid); | 1071 | ret = i2c_hid_fetch_hid_descriptor(ihid); |
| 1064 | if (ret < 0) | 1072 | if (ret < 0) |
| 1065 | goto err_pm; | 1073 | goto err_pm; |
