Thomas Bogendoerfer <[EMAIL PROTECTED]> :
[...]
> +static inline void init_rx_bufs(struct net_device *dev)
> +{
> + struct i596_private *lp = netdev_priv(dev);
> + struct i596_dma *dma = lp->dma;
> + int i;
> + struct i596_rfd *rfd;
> + struct i596_rbd *rbd;
> +
> + /* First build the Receive Buffer Descriptor List */
> +
> + for (i = 0, rbd = dma->rbds; i < rx_ring_size; i++, rbd++) {
> + dma_addr_t dma_addr;
> + struct sk_buff *skb = dev_alloc_skb(PKT_BUF_SZ + 4);
> +
> + if (skb == NULL)
> + panic(KERN_ERR "%s: alloc_skb() failed", __FILE__);
The driver could use netdev_alloc_skb.
init_rx_bufs() should handle failure more gracefully and return a proper
status code.
[...]
> +static int init_i596_mem(struct net_device *dev)
> +{
[...]
> + if (request_irq(dev->irq, &i596_interrupt, 0, "i82596", dev)) {
> + printk(KERN_ERR "%s: IRQ %d not free\n", dev->name, dev->irq);
> + goto failed_free_irq;
> + }
[...]
> +failed_free_irq:
> + free_irq(dev->irq, dev);
Oops.
--
Ueimor
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html