[PATCH] octeon: request_irq() failure ignored in cvm_oct_spi_init()

David Daney ddaney at caviumnetworks.com
Thu Sep 3 15:40:53 PDT 2009


Roel Kluin wrote:
> Produce an error if request_irq() failed.
> 
> Signed-off-by: Roel Kluin <roel.kluin at gmail.com>

Acked-by: David Daney <ddaney at caviumnetworks.com>


Yikes, below this chunk are some incorrect hard coded interrupt numbers.

> ---
> Please note that this is a patch for a different file.
> 
> diff --git a/drivers/staging/octeon/ethernet-spi.c b/drivers/staging/octeon/ethernet-spi.c
> index 66190b0..10b2121 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++;
>  



More information about the devel mailing list