Browse Source

drm/nouveau: correctly pair hwmon_init and hwmon_fini

I broke this with my commit
07cfe0e7a820ecad078c04e9c2a102521709145d

This fixes fdo #33434

Signed-off-by: Lucas Stach <dev@lynxeye.de>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Lucas Stach 14 years ago
parent
commit
8c06a3e020
1 changed files with 1 additions and 1 deletions
  1. 1 1
      drivers/gpu/drm/nouveau/nouveau_pm.c

+ 1 - 1
drivers/gpu/drm/nouveau/nouveau_pm.c

@@ -443,7 +443,7 @@ nouveau_hwmon_fini(struct drm_device *dev)
 	struct nouveau_pm_engine *pm = &dev_priv->engine.pm;
 	struct nouveau_pm_engine *pm = &dev_priv->engine.pm;
 
 
 	if (pm->hwmon) {
 	if (pm->hwmon) {
-		sysfs_remove_group(&pm->hwmon->kobj, &hwmon_attrgroup);
+		sysfs_remove_group(&dev->pdev->dev.kobj, &hwmon_attrgroup);
 		hwmon_device_unregister(pm->hwmon);
 		hwmon_device_unregister(pm->hwmon);
 	}
 	}
 #endif
 #endif