diff options
Diffstat (limited to 'drivers/hwmon/gpio-fan.c')
| -rw-r--r-- | drivers/hwmon/gpio-fan.c | 8 | 
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/hwmon/gpio-fan.c b/drivers/hwmon/gpio-fan.c index aa701a18370..f141a1de519 100644 --- a/drivers/hwmon/gpio-fan.c +++ b/drivers/hwmon/gpio-fan.c @@ -376,10 +376,6 @@ static int fan_ctrl_init(struct gpio_fan_data *fan_data,  		}  	} -	err = sysfs_create_group(&pdev->dev.kobj, &gpio_fan_ctrl_group); -	if (err) -		goto err_free_gpio; -  	fan_data->num_ctrl = num_ctrl;  	fan_data->ctrl = ctrl;  	fan_data->num_speed = pdata->num_speed; @@ -391,6 +387,10 @@ static int fan_ctrl_init(struct gpio_fan_data *fan_data,  		goto err_free_gpio;  	} +	err = sysfs_create_group(&pdev->dev.kobj, &gpio_fan_ctrl_group); +	if (err) +		goto err_free_gpio; +  	return 0;  err_free_gpio:  |