Roel Kluin wrote:
Produce an error if request_irq() failed.
Signed-off-by: Roel Kluin <roel.kluin@xxxxxxxxx>
NACK!
We have already initialized a bunch of things before doing the
request_irq. We either have to make request_irq first, or undo all the
initializations.
This is all a bit whacky, at this point the only sane thing I can think
of doing is to panic if we cannot get the irq.
David Daney
---
One question: does cvm_oct_configure_common_hw() require more
cleaning up?
diff --git a/drivers/staging/octeon/ethernet.c b/drivers/staging/octeon/ethernet.c
index b847951..fb5553d 100644
--- a/drivers/staging/octeon/ethernet.c
+++ b/drivers/staging/octeon/ethernet.c
@@ -210,6 +210,10 @@ static __init void cvm_oct_configure_common_hw(void)
r = request_irq(OCTEON_IRQ_WORKQ0 + pow_receive_group,
cvm_oct_do_interrupt, IRQF_SHARED, "Ethernet",
cvm_oct_device);
+ if (r != 0) {
+ pr_err("cvm_oct_configure_common_hw: request_irq failed");
+ return;
+ }
#if defined(CONFIG_SMP) && 0
if (USE_MULTICORE_RECEIVE) {
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel