All of lore.kernel.org
 help / color / mirror / Atom feed
* [lm-sensors] [PATCH] w83792d - fix unchecked return codes from
@ 2006-09-22 22:36 Rudolf Marek
  2006-09-23 10:45 ` Jean Delvare
  0 siblings, 1 reply; 2+ messages in thread
From: Rudolf Marek @ 2006-09-22 22:36 UTC (permalink / raw)
  To: lm-sensors

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 

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [lm-sensors] [PATCH] w83792d - fix unchecked return codes from
  2006-09-22 22:36 [lm-sensors] [PATCH] w83792d - fix unchecked return codes from Rudolf Marek
@ 2006-09-23 10:45 ` Jean Delvare
  0 siblings, 0 replies; 2+ messages in thread
From: Jean Delvare @ 2006-09-23 10:45 UTC (permalink / raw)
  To: lm-sensors

Hi Rudolf,

> 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:

> @@ -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 */
>  	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,
-- 
Jean Delvare


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-09-23 10:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-09-22 22:36 [lm-sensors] [PATCH] w83792d - fix unchecked return codes from Rudolf Marek
2006-09-23 10:45 ` Jean Delvare

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.