diff options
author | Doug Warzecha <Douglas_Warzecha@dell.com> | 2006-03-09 20:33:35 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-09 22:47:36 -0500 |
commit | 435a80f610b2ac38a4b5334a7ae22672de3f06bd (patch) | |
tree | ddac23d1719827a21cee10d0991ed078a8825c97 /drivers/firmware | |
parent | 85a6cd03a97f04ffff7bfedfa3172894ca9a617b (diff) |
[PATCH] dcdbas: dcdbas_pdev referenced after platform_device_unregister on exit
smi_data_buf_free() references dcdbas_pdev when calling
dma_free_coherent(). In dcdbas_exit(), smi_data_buf_free() is called after
platform_device_unregister(dcdbas_pdev).
This patch moves platform_device_unregister(dcdbas_pdev) after
smi_data_buf_free() in dcdbas_exit().
Signed-off-by: Doug Warzecha <Douglas_Warzecha@dell.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/firmware')
-rw-r--r-- | drivers/firmware/dcdbas.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/firmware/dcdbas.c b/drivers/firmware/dcdbas.c index 8ed6ddbb9c5d..4652512f7d1a 100644 --- a/drivers/firmware/dcdbas.c +++ b/drivers/firmware/dcdbas.c | |||
@@ -39,7 +39,7 @@ | |||
39 | #include "dcdbas.h" | 39 | #include "dcdbas.h" |
40 | 40 | ||
41 | #define DRIVER_NAME "dcdbas" | 41 | #define DRIVER_NAME "dcdbas" |
42 | #define DRIVER_VERSION "5.6.0-1" | 42 | #define DRIVER_VERSION "5.6.0-2" |
43 | #define DRIVER_DESCRIPTION "Dell Systems Management Base Driver" | 43 | #define DRIVER_DESCRIPTION "Dell Systems Management Base Driver" |
44 | 44 | ||
45 | static struct platform_device *dcdbas_pdev; | 45 | static struct platform_device *dcdbas_pdev; |
@@ -581,9 +581,13 @@ static int __init dcdbas_init(void) | |||
581 | */ | 581 | */ |
582 | static void __exit dcdbas_exit(void) | 582 | static void __exit dcdbas_exit(void) |
583 | { | 583 | { |
584 | platform_device_unregister(dcdbas_pdev); | 584 | /* |
585 | * make sure functions that use dcdbas_pdev are called | ||
586 | * before platform_device_unregister | ||
587 | */ | ||
585 | unregister_reboot_notifier(&dcdbas_reboot_nb); | 588 | unregister_reboot_notifier(&dcdbas_reboot_nb); |
586 | smi_data_buf_free(); | 589 | smi_data_buf_free(); |
590 | platform_device_unregister(dcdbas_pdev); | ||
587 | } | 591 | } |
588 | 592 | ||
589 | module_init(dcdbas_init); | 593 | module_init(dcdbas_init); |