Axel Lin 4f5b7994f0 hwmon: (gpio-fan) Fix fan_ctrl_init error path
In current implementation, the sysfs entries is not removed before return -ENODEV.

Creating the sysfs attribute should be the last thing done by the function,
after all the rest has been successful.
Otherwise there is a small window during which user-space can access the attribute
but the driver isn't ready to deal with the requests.

Fix it by moving sysfs_create_group to be the last thing done by the function.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Simon Guinot <sguinot@lacie.com>
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
2010-11-11 09:43:51 -08:00
..
2010-11-06 07:49:56 -07:00
2010-10-29 00:29:51 +02:00
2010-10-29 04:16:28 -04:00
2010-10-28 20:31:50 +02:00
2010-10-30 08:31:35 -07:00
2010-10-29 04:16:28 -04:00