diff options
Diffstat (limited to 'drivers/hwmon/adm1021.c')
-rw-r--r-- | drivers/hwmon/adm1021.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/drivers/hwmon/adm1021.c b/drivers/hwmon/adm1021.c index 71bcba8abfc0..7e76922a4ba9 100644 --- a/drivers/hwmon/adm1021.c +++ b/drivers/hwmon/adm1021.c | |||
@@ -312,8 +312,7 @@ static int adm1021_detect(struct i2c_client *client, | |||
312 | int conv_rate, status, config, man_id, dev_id; | 312 | int conv_rate, status, config, man_id, dev_id; |
313 | 313 | ||
314 | if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_BYTE_DATA)) { | 314 | if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_BYTE_DATA)) { |
315 | pr_debug("adm1021: detect failed, " | 315 | pr_debug("detect failed, smbus byte data not supported!\n"); |
316 | "smbus byte data not supported!\n"); | ||
317 | return -ENODEV; | 316 | return -ENODEV; |
318 | } | 317 | } |
319 | 318 | ||
@@ -324,7 +323,7 @@ static int adm1021_detect(struct i2c_client *client, | |||
324 | 323 | ||
325 | /* Check unused bits */ | 324 | /* Check unused bits */ |
326 | if ((status & 0x03) || (config & 0x3F) || (conv_rate & 0xF8)) { | 325 | if ((status & 0x03) || (config & 0x3F) || (conv_rate & 0xF8)) { |
327 | pr_debug("adm1021: detect failed, chip not detected!\n"); | 326 | pr_debug("detect failed, chip not detected!\n"); |
328 | return -ENODEV; | 327 | return -ENODEV; |
329 | } | 328 | } |
330 | 329 | ||
@@ -353,7 +352,7 @@ static int adm1021_detect(struct i2c_client *client, | |||
353 | else | 352 | else |
354 | type_name = "max1617"; | 353 | type_name = "max1617"; |
355 | 354 | ||
356 | pr_debug("adm1021: Detected chip %s at adapter %d, address 0x%02x.\n", | 355 | pr_debug("Detected chip %s at adapter %d, address 0x%02x.\n", |
357 | type_name, i2c_adapter_id(adapter), client->addr); | 356 | type_name, i2c_adapter_id(adapter), client->addr); |
358 | strlcpy(info->type, type_name, I2C_NAME_SIZE); | 357 | strlcpy(info->type, type_name, I2C_NAME_SIZE); |
359 | 358 | ||
@@ -368,10 +367,8 @@ static int adm1021_probe(struct i2c_client *client, | |||
368 | 367 | ||
369 | data = devm_kzalloc(&client->dev, sizeof(struct adm1021_data), | 368 | data = devm_kzalloc(&client->dev, sizeof(struct adm1021_data), |
370 | GFP_KERNEL); | 369 | GFP_KERNEL); |
371 | if (!data) { | 370 | if (!data) |
372 | pr_debug("adm1021: detect failed, devm_kzalloc failed!\n"); | ||
373 | return -ENOMEM; | 371 | return -ENOMEM; |
374 | } | ||
375 | 372 | ||
376 | i2c_set_clientdata(client, data); | 373 | i2c_set_clientdata(client, data); |
377 | data->type = id->driver_data; | 374 | data->type = id->driver_data; |