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 5/6] failure of acpi_register_gsi() should be handled properly - change acpi based 8250 driver
Date: Thu, 28 Jul 2005 16:56:18 +0900	[thread overview]
Message-ID: <42E88FA2.5010707@jp.fujitsu.com> (raw)
In-Reply-To: <42E88DC8.7050507@jp.fujitsu.com>


This patch adds the error check of acpi_register_gsi() into ACPI based
8250 serial driver.

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


---

 linux-2.6.13-rc3-kanesige/drivers/serial/8250_acpi.c |   20 +++++++++++++++----
 1 files changed, 16 insertions(+), 4 deletions(-)

diff -puN drivers/serial/8250_acpi.c~handle-error-acpi_register_gsi-8250_acpi drivers/serial/8250_acpi.c
--- linux-2.6.13-rc3/drivers/serial/8250_acpi.c~handle-error-acpi_register_gsi-8250_acpi	2005-07-28 01:01:18.000000000 +0900
+++ linux-2.6.13-rc3-kanesige/drivers/serial/8250_acpi.c	2005-07-28 01:01:18.000000000 +0900
@@ -47,18 +47,30 @@ static acpi_status acpi_serial_port(stru
 static acpi_status acpi_serial_ext_irq(struct uart_port *port,
 				       struct acpi_resource_ext_irq *ext_irq)
 {
-	if (ext_irq->number_of_interrupts > 0)
-		port->irq = acpi_register_gsi(ext_irq->interrupts[0],
+	int rc;
+
+	if (ext_irq->number_of_interrupts > 0) {
+		rc = acpi_register_gsi(ext_irq->interrupts[0],
 	                   ext_irq->edge_level, ext_irq->active_high_low);
+		if (rc < 0)
+			return AE_ERROR;
+		port->irq = rc;
+	}
 	return AE_OK;
 }
 
 static acpi_status acpi_serial_irq(struct uart_port *port,
 				   struct acpi_resource_irq *irq)
 {
-	if (irq->number_of_interrupts > 0)
-		port->irq = acpi_register_gsi(irq->interrupts[0],
+	int rc;
+
+	if (irq->number_of_interrupts > 0) {
+		rc = acpi_register_gsi(irq->interrupts[0],
 	                   irq->edge_level, irq->active_high_low);
+		if (rc < 0)
+			return AE_ERROR;
+		port->irq = rc;
+	}
 	return AE_OK;
 }
 

_


  parent reply	other threads:[~2005-07-28  8:00 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 ` [PATCH 2.6.13-rc3 2/6] failure of acpi_register_gsi() should be handled properly - change acpi pci code Kenji Kaneshige
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 ` Kenji Kaneshige [this message]
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=42E88FA2.5010707@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