[PATCH 1/2] hwmon: (asb100) Fix error message on failed subclient registration

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <khali at linux-fr.org>
Cc: Mark M. Hoffman <mhoffman at lightlink.com>
---
 drivers/hwmon/asb100.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- linux-2.6.26-rc8.orig/drivers/hwmon/asb100.c	2008-06-29 08:45:32.000000000 +0200
+++ linux-2.6.26-rc8/drivers/hwmon/asb100.c	2008-06-29 08:54:23.000000000 +0200
@@ -689,13 +689,13 @@ static int asb100_detect_subclients(stru
 
 	if ((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;
 	}
 


-- 
Jean Delvare




[Index of Archives]     [Linux Kernel]     [Linux Hardware Monitoring]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux