hwmon: (asb100) Fix error message on
PATCH 1/2 hwmon: (asb100) Fix error message on
On subclient registration failure, the asb100 driver currently claims that subclient 2 registration failed, regardless of which subclient registration actually failed. Fix it to report the number of the subclient those registration actually failed.
Signed-off-by Jean Delvare <[email protected]>
Cc Mark M. Hoffman <[email protected]>
--- drivers/hwmon/asb100.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/hwmon/asb100.c +2 -2
@@ -689,13 +689,13 @@ static int asb100_detect_subclients(struif ((err =i2c_attach_client (data->lm75[0 ]))) {dev_err (&client->dev,"subclient %d registration " -"at address 0x%x failed.\n" , i, data->lm75[0 ]->addr); +"at address 0x%x failed.\n" ,1 , data->lm75[0 ]->addr); goto ERROR_SC_2; }if ((err =i2c_attach_client (data->lm75[1 ]))) {dev_err (&client->dev,"subclient %d registration " -"at address 0x%x failed.\n" , i, data->lm75[1 ]->addr); +"at address 0x%x failed.\n" ,2 , data->lm75[1 ]->addr); goto ERROR_SC_3; }
Signature · 6 lines
Jean Delvare _______________________________________________ lm-sensors mailing list [email protected] http://lists.lm-sensors.org/mailman/listinfo/lm-sensors