public inbox for linux-ia64@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH]: Remove kfree, and fix pcidev_info struct removals
@ 2006-02-06 18:53 Prarit Bhargava
  2006-02-06 19:47 ` Prarit Bhargava
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Prarit Bhargava @ 2006-02-06 18:53 UTC (permalink / raw)
  To: linux-ia64

Remove an erroneous kfree, and unlink the pcidev_info struct from the
pcidev_info list prior to free'ing the pcidev_info struct.

Signed-off-by: Prarit Bhargava <prarit@sgi.com>

---
commit 2c57ee96e0e2da932adc8aa2c2ff5422456ccf3c
tree 8d2ed800415f31e4c455ccae295a8c432b7b70b4
parent 7c6c66362941df847957766ad133ff5fde67579c
author Prarit Bhargava <prarit@sgi.com> Mon, 06 Feb 2006 14:39:37 -0500
committer Prarit Bhargava <prarit@sgi.com> Mon, 06 Feb 2006 14:39:37 -0500

 arch/ia64/sn/kernel/io_init.c |    2 ++
 arch/ia64/sn/kernel/irq.c     |    4 +---
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/ia64/sn/kernel/io_init.c b/arch/ia64/sn/kernel/io_init.c
index d7e4d79..2e4e56b 100644
--- a/arch/ia64/sn/kernel/io_init.c
+++ b/arch/ia64/sn/kernel/io_init.c
@@ -623,6 +623,8 @@ sn_sysdata_free_start:
 	list_for_each(list, &sn_sysdata_list) {
 		element = list_entry(list, struct sysdata_el, entry);
 		list_del(&element->entry);
+		list_del(&(((struct pcidev_info *)
+			     (element->sysdata))->pdi_list));
 		kfree(element->sysdata);
 		kfree(element);
 		goto sn_sysdata_free_start;
diff --git a/arch/ia64/sn/kernel/irq.c b/arch/ia64/sn/kernel/irq.c
index 74d87d9..3187828 100644
--- a/arch/ia64/sn/kernel/irq.c
+++ b/arch/ia64/sn/kernel/irq.c
@@ -299,10 +299,8 @@ void sn_irq_unfixup(struct pci_dev *pci_
 		return;
 
 	sn_irq_info = SN_PCIDEV_INFO(pci_dev)->pdi_sn_irq_info;
-	if (!sn_irq_info || !sn_irq_info->irq_irq) {
-		kfree(sn_irq_info);
+	if (!sn_irq_info || !sn_irq_info->irq_irq)
 		return;
-	}
 
 	unregister_intr_pda(sn_irq_info);
 	spin_lock(&sn_irq_info_lock);

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2006-02-07 20:11 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-02-06 18:53 [PATCH]: Remove kfree, and fix pcidev_info struct removals Prarit Bhargava
2006-02-06 19:47 ` Prarit Bhargava
2006-02-07  7:38 ` Chen, Kenneth W
2006-02-07 20:11 ` Prarit Bhargava

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox