提交 d0cc10ab 编写于 作者: J Jirka Pirko 提交者: David S. Miller

tokenring/3c359.c: fix allocation null check

Fixed typo when allocating rx_ring, tx_ring was checked for null instead.
Signed-off-by: NJirka Pirko <jirka@pirko.cz>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 85920d43
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册