linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] dcdbas: dcdbas_pdev referenced after platform_device_unregister on exit
@ 2006-03-09  1:03 Doug Warzecha
  0 siblings, 0 replies; only message in thread
From: Doug Warzecha @ 2006-03-09  1:03 UTC (permalink / raw)
  To: akpm, linux-kernel

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>
---

--- linux-2.6.16-rc5/drivers/firmware/dcdbas.c.orig	2006-03-07 16:28:18.000000000 -0600
+++ linux-2.6.16-rc5/drivers/firmware/dcdbas.c	2006-03-07 19:38:46.172641512 -0600
@@ -39,7 +39,7 @@
 #include "dcdbas.h"
 
 #define DRIVER_NAME		"dcdbas"
-#define DRIVER_VERSION		"5.6.0-1"
+#define DRIVER_VERSION		"5.6.0-2"
 #define DRIVER_DESCRIPTION	"Dell Systems Management Base Driver"
 
 static struct platform_device *dcdbas_pdev;
@@ -581,9 +581,13 @@ static int __init dcdbas_init(void)
  */
 static void __exit dcdbas_exit(void)
 {
-	platform_device_unregister(dcdbas_pdev);
+	/*
+	 * make sure functions that use dcdbas_pdev are called
+	 * before platform_device_unregister
+	 */
 	unregister_reboot_notifier(&dcdbas_reboot_nb);
 	smi_data_buf_free();
+	platform_device_unregister(dcdbas_pdev);
 }
 
 module_init(dcdbas_init);

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2006-03-09  0:56 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-03-09  1:03 [PATCH] dcdbas: dcdbas_pdev referenced after platform_device_unregister on exit Doug Warzecha

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).