Commit 0dd7699e authored by Jean Delvare's avatar Jean Delvare Committed by Greg Kroah-Hartman

smsc47m1: dev_warn fix

smsc47m1: dev_warn fix

We can't use dev_warn on an i2c client before it is attached.
Signed-off-by: default avatarJean Delvare <khali@linux-fr.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent b25a1063
...@@ -429,7 +429,8 @@ static int smsc47m1_detect(struct i2c_adapter *adapter) ...@@ -429,7 +429,8 @@ static int smsc47m1_detect(struct i2c_adapter *adapter)
pwm2 = (smsc47m1_read_value(new_client, SMSC47M1_REG_PPIN(1)) & 0x05) pwm2 = (smsc47m1_read_value(new_client, SMSC47M1_REG_PPIN(1)) & 0x05)
== 0x04; == 0x04;
if (!(fan1 || fan2 || pwm1 || pwm2)) { if (!(fan1 || fan2 || pwm1 || pwm2)) {
dev_warn(&new_client->dev, "Device is not configured, will not use\n"); dev_warn(&adapter->dev, "Device at 0x%x is not configured, "
"will not use\n", new_client->addr);
err = -ENODEV; err = -ENODEV;
goto error_free; goto error_free;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment