projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
14a4019
)
hwmon/f71882fg: Set platform drvdata to NULL later
author
Hans de Goede
<
[email protected]
>
Sun, 13 Mar 2011 12:50:33 +0000
(13:50 +0100)
committer
Guenter Roeck
<
[email protected]
>
Sun, 13 Mar 2011 14:42:52 +0000
(07:42 -0700)
This avoids a possible race leading to trying to dereference NULL.
Signed-off-by: Hans de Goede <
[email protected]
>
Acked-by: Jean Delvare <
[email protected]
>
Cc:
[email protected]
Signed-off-by: Guenter Roeck <
[email protected]
>
drivers/hwmon/f71882fg.c
patch
|
blob
|
history
diff --git
a/drivers/hwmon/f71882fg.c
b/drivers/hwmon/f71882fg.c
index ed04f07410fb4504fc45be2a88e5d1659e1958b5..6e06019015a5cf5644458fc62b061899eb1488b5 100644
(file)
--- 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;