Skip to content

Commit

Permalink
tokenring/3c359.c: fix allocation null check
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jirka Pirko authored and David S. Miller committed Nov 24, 2008
1 parent 85920d4 commit d0cc10a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/tokenring/3c359.c
Original file line number Diff line number Diff line change
Expand Up @@ -644,7 +644,7 @@ static int xl_open(struct net_device *dev)
return -ENOMEM;
}
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",
dev->name);
free_irq(dev->irq,dev);
Expand Down

0 comments on commit d0cc10a

Please sign in to comment.