diff options
Diffstat (limited to 'drivers/hwmon')
-rw-r--r-- | drivers/hwmon/pkgtemp.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/hwmon/pkgtemp.c b/drivers/hwmon/pkgtemp.c index 844957333fe5..f7ddee5fe9d5 100644 --- a/drivers/hwmon/pkgtemp.c +++ b/drivers/hwmon/pkgtemp.c | |||
@@ -224,7 +224,7 @@ static int __devinit pkgtemp_probe(struct platform_device *pdev) | |||
224 | 224 | ||
225 | err = sysfs_create_group(&pdev->dev.kobj, &pkgtemp_group); | 225 | err = sysfs_create_group(&pdev->dev.kobj, &pkgtemp_group); |
226 | if (err) | 226 | if (err) |
227 | goto exit_free; | 227 | goto exit_dev; |
228 | 228 | ||
229 | data->hwmon_dev = hwmon_device_register(&pdev->dev); | 229 | data->hwmon_dev = hwmon_device_register(&pdev->dev); |
230 | if (IS_ERR(data->hwmon_dev)) { | 230 | if (IS_ERR(data->hwmon_dev)) { |
@@ -238,6 +238,8 @@ static int __devinit pkgtemp_probe(struct platform_device *pdev) | |||
238 | 238 | ||
239 | exit_class: | 239 | exit_class: |
240 | sysfs_remove_group(&pdev->dev.kobj, &pkgtemp_group); | 240 | sysfs_remove_group(&pdev->dev.kobj, &pkgtemp_group); |
241 | exit_dev: | ||
242 | device_remove_file(&pdev->dev, &sensor_dev_attr_temp1_max.dev_attr); | ||
241 | exit_free: | 243 | exit_free: |
242 | kfree(data); | 244 | kfree(data); |
243 | exit: | 245 | exit: |
@@ -250,6 +252,7 @@ static int __devexit pkgtemp_remove(struct platform_device *pdev) | |||
250 | 252 | ||
251 | hwmon_device_unregister(data->hwmon_dev); | 253 | hwmon_device_unregister(data->hwmon_dev); |
252 | sysfs_remove_group(&pdev->dev.kobj, &pkgtemp_group); | 254 | sysfs_remove_group(&pdev->dev.kobj, &pkgtemp_group); |
255 | device_remove_file(&pdev->dev, &sensor_dev_attr_temp1_max.dev_attr); | ||
253 | platform_set_drvdata(pdev, NULL); | 256 | platform_set_drvdata(pdev, NULL); |
254 | kfree(data); | 257 | kfree(data); |
255 | return 0; | 258 | return 0; |