[PATCH] I2C W83792D add hwmon class register 2/3

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

 



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




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

  Powered by Linux