Skip to contentSkip to conversation

w83792d - fix unchecked return codes from

PATCH New Rudolf Marek 2 participants 2 messages Sep 22, 2006 – Sep 23, 2006

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 w83792d - fix unchecked return codes from

Hello,

Following patch fixes the w83792d driver. It adds error checking to device_create file and also cares to destroy the files upon exit.

I will test it as soon I will get the disk back to my test machine with this chip. Possible dates are: Saturday evening, Sunday and Monday for sure ;) Until now, compiles without warnings.

Signed-off-by Rudolf Marek <r.marek at assembler.cz>

Regards
Rudolf
-------------- next part --------------
A non-text attachment was scrubbed...
Name: w83792d.patch
Type: text/x-patch
Size: 28882 bytes
Desc: not available
Url : http://lists.lm-sensors.org/pipermail/lm-sensors/attachments/20060923/6c3c4039/attachment-0001.bin

Applied
#1 lore raw

PATCH 1/1 w83792d - fix unchecked return codes from

Hi Rudolf,

Quoted 6 lines

Following patch fixes the w83792d driver. It adds error checking to device_create file and also cares to destroy the files upon exit.

I will test it as soon I will get the disk back to my test machine with this chip. Possible dates are: Saturday evening, Sunday and Monday for sure ;) Until now, compiles without warnings.

Applied, with the following fix:

Quoted 9 lines
(quoted diff) +1 -1
@@ -1342,12 +1428,16 @@ static int
 w83792d_detach_client(struct i2c_client *client)
 {
 	struct w83792d_data *data = i2c_get_clientdata(client);
-	int err;
+	int err, i;
 
 	/* main client */

Review static int · line 1443

Quoted 10 lines
(quoted diff) +4 -0
 	if (data)
 		hwmon_device_unregister(data->class_dev);
 
+	sysfs_remove_group(&client->dev.kobj, &w83792d_group);
+	for (i = 0; i < ARRAY_SIZE(w83792d_group_fan); i++)
+		sysfs_remove_group(&client->dev.kobj, &w83792d_group_fan[i]);
+
 	if ((err = i2c_detach_client(client)))
 		return err;
 

Only the main client has the files, so the file removal should be conditional upon "data" too.

The rest looks OK to me. Testing is still welcome nevertheless.

Thanks,

Signature · 1 line
Jean Delvare