mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Doug Warzecha <Douglas_Warzecha@dell.com>
To: akpm@osdl.org, linux-kernel@vger.kernel.org
Subject: [PATCH] dcdbas: dcdbas_pdev referenced after platform_device_unregister on exit
Date: Wed, 8 Mar 2006 19:03:18 -0600	[thread overview]
Message-ID: <20060309010317.GA4375@sysman-doug.us.dell.com> (raw)

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

                 reply	other threads:[~2006-03-09  0:56 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060309010317.GA4375@sysman-doug.us.dell.com \
    --to=douglas_warzecha@dell.com \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome