public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
To: Andrew Morton <akpm@osdl.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	linux-ia64@vger.kernel.org
Cc: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Subject: [PATCH 2.6.13-rc3 2/6] failure of acpi_register_gsi() should be handled properly - change acpi pci code
Date: Thu, 28 Jul 2005 16:52:39 +0900	[thread overview]
Message-ID: <42E88EC7.9080200@jp.fujitsu.com> (raw)
In-Reply-To: <42E88DC8.7050507@jp.fujitsu.com>


This patch adds the error check of acpi_register_gsi() into
acpi_pci_enable_irq().

Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>


---

 linux-2.6.13-rc3-kanesige/drivers/acpi/pci_irq.c |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletion(-)

diff -puN drivers/acpi/pci_irq.c~handle-error-acpi_register_gsi-acpi_pci_enable_irq drivers/acpi/pci_irq.c
--- linux-2.6.13-rc3/drivers/acpi/pci_irq.c~handle-error-acpi_register_gsi-acpi_pci_enable_irq	2005-07-28 01:01:15.000000000 +0900
+++ linux-2.6.13-rc3-kanesige/drivers/acpi/pci_irq.c	2005-07-28 01:01:15.000000000 +0900
@@ -392,6 +392,7 @@ acpi_pci_irq_enable (
 	int			edge_level = ACPI_LEVEL_SENSITIVE;
 	int			active_high_low = ACPI_ACTIVE_LOW;
 	char			*link = NULL;
+	int			rc;
 
 	ACPI_FUNCTION_TRACE("acpi_pci_irq_enable");
 
@@ -444,7 +445,13 @@ acpi_pci_irq_enable (
 		}
  	}
 
-	dev->irq = acpi_register_gsi(irq, edge_level, active_high_low);
+	rc = acpi_register_gsi(irq, edge_level, active_high_low);
+	if (rc < 0) {
+		printk(KERN_WARNING PREFIX "PCI Interrupt %s[%c]: failed "
+		       "to register GSI\n", pci_name(dev), ('A' + pin));
+		return_VALUE(rc);
+	}
+	dev->irq = rc;
 
 	printk(KERN_INFO PREFIX "PCI Interrupt %s[%c] -> ",
 		pci_name(dev), 'A' + pin);

_



  parent reply	other threads:[~2005-07-28  7:55 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-07-28  7:48 [PATCH 2.6.13-rc3 0/6] failure of acpi_register_gsi() should be handled properly Kenji Kaneshige
2005-07-28  7:51 ` [PATCH 2.6.13-rc3 1/6] failure of acpi_register_gsi() should be handled properly - change acpi_register_gsi() interface Kenji Kaneshige
2005-07-28  7:52 ` Kenji Kaneshige [this message]
2005-07-28  7:53 ` [PATCH 2.6.13-rc3 3/6] failure of acpi_register_gsi() should be handled properly - change hpet driver Kenji Kaneshige
2005-07-28  7:54 ` [PATCH 2.6.13-rc3 4/6] failure of acpi_register_gsi() should be handled properly - change phpacpi driver Kenji Kaneshige
2005-07-28  7:56 ` [PATCH 2.6.13-rc3 5/6] failure of acpi_register_gsi() should be handled properly - change acpi based 8250 driver Kenji Kaneshige
2005-07-28  7:58 ` [PATCH 2.6.13-rc3 6/6] failure of acpi_register_gsi() should be handled properly - change ia64 iosapic code Kenji Kaneshige

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=42E88EC7.9080200@jp.fujitsu.com \
    --to=kaneshige.kenji@jp.fujitsu.com \
    --cc=akpm@osdl.org \
    --cc=linux-ia64@vger.kernel.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