Hi Rudolf, > + data->class_dev = hwmon_device_register(&new_client->dev); > + if (IS_ERR(data->class_dev)) { > + err = PTR_ERR(data->class_dev); > + goto ERROR2; > + } I do not think this is sufficient. If an error occurs at this point, and you go to ERROR2, you will not free the subclients you might have allocated. I guess they could be freed later on module unload, but it's probably safer and cleaner to free them now, just like asb100 does for example. Thanks, -- Jean Delvare