提交 5b5103ec 编写于 作者: H Hannes Eder 提交者: David S. Miller

drivers/net/r6040.c: fix sparse warning: Using plain integer as NULL pointer

Fix this sparse warnings:
  drivers/net/r6040.c:487:31: warning: Using plain integer as NULL pointer
  drivers/net/r6040.c:492:31: warning: Using plain integer as NULL pointer
Signed-off-by: NHannes Eder <hannes@hanneseder.net>
Acked-by: NFlorian Fainelli <florian@openwrt.org>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 d6781f2a
...@@ -484,12 +484,12 @@ static int r6040_close(struct net_device *dev) ...@@ -484,12 +484,12 @@ static int r6040_close(struct net_device *dev)
/* Free Descriptor memory */ /* Free Descriptor memory */
if (lp->rx_ring) { if (lp->rx_ring) {
pci_free_consistent(pdev, RX_DESC_SIZE, lp->rx_ring, lp->rx_ring_dma); pci_free_consistent(pdev, RX_DESC_SIZE, lp->rx_ring, lp->rx_ring_dma);
lp->rx_ring = 0; lp->rx_ring = NULL;
} }
if (lp->tx_ring) { if (lp->tx_ring) {
pci_free_consistent(pdev, TX_DESC_SIZE, lp->tx_ring, lp->tx_ring_dma); pci_free_consistent(pdev, TX_DESC_SIZE, lp->tx_ring, lp->tx_ring_dma);
lp->tx_ring = 0; lp->tx_ring = NULL;
} }
return 0; return 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册