Skip to content

Commit

Permalink
smsc47m1: dev_warn fix
Browse files Browse the repository at this point in the history
smsc47m1: dev_warn fix

We can't use dev_warn on an i2c client before it is attached.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Jean Delvare authored and Greg Kroah-Hartman committed Sep 28, 2006
1 parent b25a106 commit 0dd7699
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/hwmon/smsc47m1.c
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,8 @@ static int smsc47m1_detect(struct i2c_adapter *adapter)
pwm2 = (smsc47m1_read_value(new_client, SMSC47M1_REG_PPIN(1)) & 0x05)
== 0x04;
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;
goto error_free;
}
Expand Down

0 comments on commit 0dd7699

Please sign in to comment.