Re: [PATCH 2/3] macsonic: free irq if sonic_open() fails

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Jul 10, 2010 at 03:01:00PM +0400, Kulikov Vasiliy wrote:

> +	if (dev->irq == IRQ_AUTO_3) {
> +		retval = request_irq(IRQ_NUBUS_9, macsonic_interrupt,
> +					IRQ_FLG_FAST, "sonic", dev);
> +		if (retval) {
> +			printk(KERN_ERR "%s: unable to get IRQ %d.\n",
> +					dev->name, IRQ_NUBUS_9);
> +			goto err_irq;
>  		}
> -	return sonic_open(dev);
> +	}
> +	retval = sonic_open(dev);
> +	if (retval)
> +		goto err_irq_nubus;
> +	return 0;
> +
> +err_irq_nubus:

This should be:

+	if (dev->irq == IRQ_AUTO_3)
+		free_irq(IRQ_NUBUS_9, dev);

> +err_irq:
> +	free_irq(dev->irq, dev);
> +err:
> +	return retval;
>  }

regards,
dan carpenter

--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux