]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/hwmon/f71805f.c
hwmon: Fix a potential race condition on unload
[linux-2.6-omap-h63xx.git] / drivers / hwmon / f71805f.c
index e8b15047a6d348c8e6072ff4dd8806331372b6fa..8fe4d70d8f51148071df253520a0b00e7d5becd0 100644 (file)
@@ -1242,12 +1242,12 @@ static int __devexit f71805f_remove(struct platform_device *pdev)
        struct resource *res;
        int i;
 
-       platform_set_drvdata(pdev, NULL);
        hwmon_device_unregister(data->class_dev);
        sysfs_remove_group(&pdev->dev.kobj, &f71805f_group);
        for (i = 0; i < 4; i++)
                sysfs_remove_group(&pdev->dev.kobj, &f71805f_group_optin[i]);
        sysfs_remove_group(&pdev->dev.kobj, &f71805f_group_pwm_freq);
+       platform_set_drvdata(pdev, NULL);
        kfree(data);
 
        res = platform_get_resource(pdev, IORESOURCE_IO, 0);