diff options
-rw-r--r-- | drivers/hwmon/f71882fg.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/hwmon/f71882fg.c b/drivers/hwmon/f71882fg.c index ed04f07410fb..6e06019015a5 100644 --- a/drivers/hwmon/f71882fg.c +++ b/drivers/hwmon/f71882fg.c | |||
@@ -2111,7 +2111,6 @@ static int f71882fg_remove(struct platform_device *pdev) | |||
2111 | int nr_fans = (data->type == f71882fg) ? 4 : 3; | 2111 | int nr_fans = (data->type == f71882fg) ? 4 : 3; |
2112 | u8 start_reg = f71882fg_read8(data, F71882FG_REG_START); | 2112 | u8 start_reg = f71882fg_read8(data, F71882FG_REG_START); |
2113 | 2113 | ||
2114 | platform_set_drvdata(pdev, NULL); | ||
2115 | if (data->hwmon_dev) | 2114 | if (data->hwmon_dev) |
2116 | hwmon_device_unregister(data->hwmon_dev); | 2115 | hwmon_device_unregister(data->hwmon_dev); |
2117 | 2116 | ||
@@ -2178,6 +2177,7 @@ static int f71882fg_remove(struct platform_device *pdev) | |||
2178 | } | 2177 | } |
2179 | } | 2178 | } |
2180 | 2179 | ||
2180 | platform_set_drvdata(pdev, NULL); | ||
2181 | kfree(data); | 2181 | kfree(data); |
2182 | 2182 | ||
2183 | return 0; | 2183 | return 0; |