diff options
author | Hans de Goede <hdegoede@redhat.com> | 2011-03-13 15:50:33 +0300 |
---|---|---|
committer | Guenter Roeck <guenter.roeck@ericsson.com> | 2011-03-13 17:42:52 +0300 |
commit | d9ebaa45472c92704f4814682eec21455edcfa1f (patch) | |
tree | 83c54fcd7644b73db73bd2f40c211cabd1a2e7fc /drivers/hwmon/f71882fg.c | |
parent | 14a4019de88111d26ba444495fd14833ddb2d65e (diff) | |
download | linux-d9ebaa45472c92704f4814682eec21455edcfa1f.tar.xz |
hwmon/f71882fg: Set platform drvdata to NULL later
This avoids a possible race leading to trying to dereference NULL.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Jean Delvare <khali@linux-fr.org>
Cc: stable@kernel.org
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
Diffstat (limited to 'drivers/hwmon/f71882fg.c')
-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) int nr_fans = (data->type == f71882fg) ? 4 : 3; u8 start_reg = f71882fg_read8(data, F71882FG_REG_START); - platform_set_drvdata(pdev, NULL); if (data->hwmon_dev) hwmon_device_unregister(data->hwmon_dev); @@ -2178,6 +2177,7 @@ static int f71882fg_remove(struct platform_device *pdev) } } + platform_set_drvdata(pdev, NULL); kfree(data); return 0; |