tokenring/3c359.c: fix allocation null check

Fixed typo when allocating rx_ring, tx_ring was checked for null instead.

Signed-off-by: Jirka Pirko <jirka@pirko.cz>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Jirka Pirko 2008-11-24 14:47:53 -08:00 committed by David S. Miller
parent 85920d43bd
commit d0cc10ab0e

View File

@ -644,7 +644,7 @@ static int xl_open(struct net_device *dev)
return -ENOMEM; return -ENOMEM;
} }
xl_priv->xl_rx_ring = kzalloc((sizeof(struct xl_rx_desc) * XL_RX_RING_SIZE) +7, GFP_DMA | GFP_KERNEL); xl_priv->xl_rx_ring = kzalloc((sizeof(struct xl_rx_desc) * XL_RX_RING_SIZE) +7, GFP_DMA | GFP_KERNEL);
if (xl_priv->xl_tx_ring == NULL) { if (xl_priv->xl_rx_ring == NULL) {
printk(KERN_WARNING "%s: Not enough memory to allocate rx buffers.\n", printk(KERN_WARNING "%s: Not enough memory to allocate rx buffers.\n",
dev->name); dev->name);
free_irq(dev->irq,dev); free_irq(dev->irq,dev);