]> git.sur5r.net Git - groeck-nct6775/commitdiff
Driver should not rely or depend on setting platform_drvdata to NULL
authorGuenter Roeck <linux@roeck-us.net>
Mon, 12 Mar 2012 18:35:09 +0000 (11:35 -0700)
committerGuenter Roeck <linux@roeck-us.net>
Mon, 12 Mar 2012 21:08:20 +0000 (14:08 -0700)
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
nct6775.c

index a0f2e3ce8b34ef72a03f1cc59d9e75a1dadca7ae..09c03abd6d01dee82e1238ebaf9ae489b0743017 100644 (file)
--- a/nct6775.c
+++ b/nct6775.c
@@ -2943,7 +2943,6 @@ static int __devinit nct6775_probe(struct platform_device *pdev)
 exit_remove:
        nct6775_device_remove_files(dev);
 exit_release:
-       platform_set_drvdata(pdev, NULL);
        release_region(res->start, IOREGION_LENGTH);
 exit:
        return err;
@@ -2956,7 +2955,6 @@ static int __devexit nct6775_remove(struct platform_device *pdev)
        hwmon_device_unregister(data->hwmon_dev);
        nct6775_device_remove_files(&pdev->dev);
        release_region(data->addr, IOREGION_LENGTH);
-       platform_set_drvdata(pdev, NULL);
 
        return 0;
 }