[PATCH] octeon: request_irq() failure ignored in cvm_oct_spi_init()
David Daney
ddaney at caviumnetworks.com
Tue Sep 8 08:56:14 PDT 2009
Roel Kluin wrote:
> Produce an error if request_irq() fails. Replace incorrect hard coded
> interrupt numbers used to free the octeon irq.
>
> Signed-off-by: Roel Kluin <roel.kluin at gmail.com>
> ---
>> Yikes, below this chunk are some incorrect hard coded interrupt numbers.
>
> Maybe it should be this? Replaces the other patch.
No. I acked the original.
I already sent Ralf and lmo the patch to fix the irq number issue. I
suspect that Ralf will merge that version.
>
> diff --git a/drivers/staging/octeon/ethernet-spi.c b/drivers/staging/octeon/ethernet-spi.c
> index 66190b0..9b654f2 100644
> --- a/drivers/staging/octeon/ethernet-spi.c
> +++ b/drivers/staging/octeon/ethernet-spi.c
> @@ -295,6 +295,8 @@ int cvm_oct_spi_init(struct net_device *dev)
> if (number_spi_ports == 0) {
> r = request_irq(OCTEON_IRQ_RML, cvm_oct_spi_rml_interrupt,
> IRQF_SHARED, "SPI", &number_spi_ports);
> + if (r != 0)
> + return r;
> }
> number_spi_ports++;
>
> @@ -317,6 +319,6 @@ void cvm_oct_spi_uninit(struct net_device *dev)
> cvmx_write_csr(CVMX_SPXX_INT_MSK(interface), 0);
> cvmx_write_csr(CVMX_STXX_INT_MSK(interface), 0);
> }
> - free_irq(8 + 46, &number_spi_ports);
> + free_irq(OCTEON_IRQ_RML, &number_spi_ports);
> }
> }
More information about the devel
mailing list