From d0cc10ab0e3740b629d88386c907342f77cbdb30 Mon Sep 17 00:00:00 2001 From: Jirka Pirko Date: Mon, 24 Nov 2008 14:47:53 -0800 Subject: 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 Signed-off-by: David S. Miller --- drivers/net/tokenring/3c359.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/tokenring/3c359.c b/drivers/net/tokenring/3c359.c index 87509a65b3b..7b45a293f5e 100644 --- a/drivers/net/tokenring/3c359.c +++ b/drivers/net/tokenring/3c359.c @@ -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); -- cgit v1.2.3