All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 3/3] SPARC: Handle request_irq() failure
@ 2007-02-26 16:09 ` Monakhov Dmitriy
  0 siblings, 0 replies; 4+ messages in thread
From: Monakhov Dmitriy @ 2007-02-26 16:09 UTC (permalink / raw)
  To: linux-kernel; +Cc: sparclinux, devel



Signed-off-by: Monakhov Dmitriy <dmonakhov@openvz.org>
---
 drivers/sbus/char/uctrl.c |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/drivers/sbus/char/uctrl.c b/drivers/sbus/char/uctrl.c
index 45cf5bc..6b96aa3 100644
--- a/drivers/sbus/char/uctrl.c
+++ b/drivers/sbus/char/uctrl.c
@@ -364,6 +364,7 @@ static int __init ts102_uctrl_init(void)
 	struct linux_prom_irqs tmp_irq[2];
         unsigned int vaddr[2] = { 0, 0 };
 	int tmpnode, uctrlnode = prom_getchild(prom_root_node);
+	int err;
 
 	tmpnode = prom_searchsiblings(uctrlnode, "obio");
 
@@ -389,7 +390,12 @@ static int __init ts102_uctrl_init(void)
 	if(!driver->irq) 
 		driver->irq = tmp_irq[0].pri;
 
-	request_irq(driver->irq, uctrl_interrupt, 0, "uctrl", driver);
+	err = request_irq(driver->irq, uctrl_interrupt, 0, "uctrl", driver);
+	if (err) {
+		printk(KERN_ERR "%s: unable to request irq  %d\n",
+				__FUNCTION__, driver->irq);
+		return -EBUSY;
+	}
 
 	if (misc_register(&uctrl_dev)) {
 		printk("%s: unable to get misc minor %d\n",
-- 
1.5.0.1



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

* [PATCH 3/3] SPARC: Handle request_irq() failure
@ 2007-02-26 16:09 ` Monakhov Dmitriy
  0 siblings, 0 replies; 4+ messages in thread
From: Monakhov Dmitriy @ 2007-02-26 16:09 UTC (permalink / raw)
  To: linux-kernel; +Cc: sparclinux, devel



Signed-off-by: Monakhov Dmitriy <dmonakhov@openvz.org>
---
 drivers/sbus/char/uctrl.c |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/drivers/sbus/char/uctrl.c b/drivers/sbus/char/uctrl.c
index 45cf5bc..6b96aa3 100644
--- a/drivers/sbus/char/uctrl.c
+++ b/drivers/sbus/char/uctrl.c
@@ -364,6 +364,7 @@ static int __init ts102_uctrl_init(void)
 	struct linux_prom_irqs tmp_irq[2];
         unsigned int vaddr[2] = { 0, 0 };
 	int tmpnode, uctrlnode = prom_getchild(prom_root_node);
+	int err;
 
 	tmpnode = prom_searchsiblings(uctrlnode, "obio");
 
@@ -389,7 +390,12 @@ static int __init ts102_uctrl_init(void)
 	if(!driver->irq) 
 		driver->irq = tmp_irq[0].pri;
 
-	request_irq(driver->irq, uctrl_interrupt, 0, "uctrl", driver);
+	err = request_irq(driver->irq, uctrl_interrupt, 0, "uctrl", driver);
+	if (err) {
+		printk(KERN_ERR "%s: unable to request irq  %d\n",
+				__FUNCTION__, driver->irq);
+		return -EBUSY;
+	}
 
 	if (misc_register(&uctrl_dev)) {
 		printk("%s: unable to get misc minor %d\n",
-- 
1.5.0.1



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

* Re: [PATCH 3/3] SPARC: Handle request_irq() failure
  2007-02-26 16:09 ` Monakhov Dmitriy
@ 2007-02-26 17:44   ` David Miller
  -1 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2007-02-26 17:44 UTC (permalink / raw)
  To: dmonakhov; +Cc: linux-kernel, sparclinux, devel

From: Monakhov Dmitriy <dmonakhov@openvz.org>
Date: Mon, 26 Feb 2007 19:09:27 +0300

> Signed-off-by: Monakhov Dmitriy <dmonakhov@openvz.org>
 ...
> @@ -389,7 +390,12 @@ static int __init ts102_uctrl_init(void)
>  	if(!driver->irq) 
>  		driver->irq = tmp_irq[0].pri;
>  
> -	request_irq(driver->irq, uctrl_interrupt, 0, "uctrl", driver);
> +	err = request_irq(driver->irq, uctrl_interrupt, 0, "uctrl", driver);
> +	if (err) {
> +		printk(KERN_ERR "%s: unable to request irq  %d\n",
> +				__FUNCTION__, driver->irq);
> +		return -EBUSY;
> +	}
>  

Why not return the error code that request_irq() gave us?

That's how I'll fix this bug.

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

* Re: [PATCH 3/3] SPARC: Handle request_irq() failure
@ 2007-02-26 17:44   ` David Miller
  0 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2007-02-26 17:44 UTC (permalink / raw)
  To: dmonakhov; +Cc: linux-kernel, sparclinux, devel

From: Monakhov Dmitriy <dmonakhov@openvz.org>
Date: Mon, 26 Feb 2007 19:09:27 +0300

> Signed-off-by: Monakhov Dmitriy <dmonakhov@openvz.org>
 ...
> @@ -389,7 +390,12 @@ static int __init ts102_uctrl_init(void)
>  	if(!driver->irq) 
>  		driver->irq = tmp_irq[0].pri;
>  
> -	request_irq(driver->irq, uctrl_interrupt, 0, "uctrl", driver);
> +	err = request_irq(driver->irq, uctrl_interrupt, 0, "uctrl", driver);
> +	if (err) {
> +		printk(KERN_ERR "%s: unable to request irq  %d\n",
> +				__FUNCTION__, driver->irq);
> +		return -EBUSY;
> +	}
>  

Why not return the error code that request_irq() gave us?

That's how I'll fix this bug.

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

end of thread, other threads:[~2007-02-26 17:44 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-02-26 16:09 [PATCH 3/3] SPARC: Handle request_irq() failure Monakhov Dmitriy
2007-02-26 16:09 ` Monakhov Dmitriy
2007-02-26 17:44 ` David Miller
2007-02-26 17:44   ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.