summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuenter Roeck <linux@roeck-us.net>2021-03-10 20:11:54 -0800
committerGuenter Roeck <linux@roeck-us.net>2021-04-20 06:50:14 -0700
commit69698bde1873bb203fc0cb20026765ea5c4f93fe (patch)
treee4ca9803340a16d2050a31985f30d3077660fc74
parent1e28eed17697bcf343c6743f0028cc3b5dd88bf0 (diff)
downloadlinux-stable-69698bde1873bb203fc0cb20026765ea5c4f93fe.tar.gz
linux-stable-69698bde1873bb203fc0cb20026765ea5c4f93fe.tar.bz2
linux-stable-69698bde1873bb203fc0cb20026765ea5c4f93fe.zip
hwmon: (adm9240) Drop log messages from detect function
Not detecting a chip in the detect function is normal and should not generate any log messages, much less error messages. Cc: Chris Packham <Chris.Packham@alliedtelesis.co.nz> Reviewed-by: Chris Packham <chris.packham@alliedtelesis.co.nz> Tested-by: Chris Packham <chris.packham@alliedtelesis.co.nz> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
-rw-r--r--drivers/hwmon/adm9240.c17
1 files changed, 5 insertions, 12 deletions
diff --git a/drivers/hwmon/adm9240.c b/drivers/hwmon/adm9240.c
index cc3e0184e720..3bbdd662c9e4 100644
--- a/drivers/hwmon/adm9240.c
+++ b/drivers/hwmon/adm9240.c
@@ -730,26 +730,19 @@ static int adm9240_detect(struct i2c_client *new_client,
return -ENODEV;
/* verify chip: reg address should match i2c address */
- if (i2c_smbus_read_byte_data(new_client, ADM9240_REG_I2C_ADDR)
- != address) {
- dev_err(&adapter->dev, "detect fail: address match, 0x%02x\n",
- address);
+ if (i2c_smbus_read_byte_data(new_client, ADM9240_REG_I2C_ADDR) != address)
return -ENODEV;
- }
/* check known chip manufacturer */
man_id = i2c_smbus_read_byte_data(new_client, ADM9240_REG_MAN_ID);
- if (man_id == 0x23) {
+ if (man_id == 0x23)
name = "adm9240";
- } else if (man_id == 0xda) {
+ else if (man_id == 0xda)
name = "ds1780";
- } else if (man_id == 0x01) {
+ else if (man_id == 0x01)
name = "lm81";
- } else {
- dev_err(&adapter->dev, "detect fail: unknown manuf, 0x%02x\n",
- man_id);
+ else
return -ENODEV;
- }
/* successful detect, print chip info */
die_rev = i2c_smbus_read_byte_data(new_client, ADM9240_REG_DIE_REV);