Patchwork [09/43] drivers/net/r6040.c: fix sparse warning: Using plain integer as NULL pointer

login
register
mail settings
Submitter Hannes Eder
Date Feb. 14, 2009, 9:14 p.m.
Message ID <20090214211400.23489.24726.stgit@vmbox.hanneseder.net>
Download mbox | patch
Permalink /patch/23155/
State Accepted
Delegated to: David Miller
Headers show

Comments

Hannes Eder - Feb. 14, 2009, 9:14 p.m.
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: Hannes Eder <hannes@hanneseder.net>
---
 drivers/net/r6040.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)


--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Florian Fainelli - Feb. 15, 2009, 2 p.m.
Hello Hannes,

Le Saturday 14 February 2009 22:14:04 Hannes Eder, vous avez écrit :
> 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

Good catch, thanks.
>
> Signed-off-by: Hannes Eder <hannes@hanneseder.net>

Acked-by: Florian Fainelli <florian@openwrt.org>
David Miller - Feb. 18, 2009, 1:22 a.m.
From: Florian Fainelli <florian@openwrt.org>
Date: Sun, 15 Feb 2009 15:00:06 +0100

> Hello Hannes,
> 
> Le Saturday 14 February 2009 22:14:04 Hannes Eder, vous avez écrit :
> > 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
> 
> Good catch, thanks.
> >
> > Signed-off-by: Hannes Eder <hannes@hanneseder.net>
> 
> Acked-by: Florian Fainelli <florian@openwrt.org>

Applied.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

diff --git a/drivers/net/r6040.c b/drivers/net/r6040.c
index 3c27a7b..9c95ebe 100644
--- a/drivers/net/r6040.c
+++ b/drivers/net/r6040.c
@@ -484,12 +484,12 @@  static int r6040_close(struct net_device *dev)
 	/* Free Descriptor memory */
 	if (lp->rx_ring) {
 		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) {
 		pci_free_consistent(pdev, TX_DESC_SIZE, lp->tx_ring, lp->tx_ring_dma);
-		lp->tx_ring = 0;
+		lp->tx_ring = NULL;
 	}
 
 	return 0;