Patchwork [1/1] net/smsc911x: Use NULL instead of integer for pointer

login
register
mail settings
Submitter Sachin Kamat
Date March 19, 2013, 7:01 a.m.
Message ID <1363676498-9370-1-git-send-email-sachin.kamat@linaro.org>
Download mbox | patch
Permalink /patch/228925/
State Accepted
Delegated to: David Miller
Headers show

Comments

Sachin Kamat - March 19, 2013, 7:01 a.m.
Silences the following sparse warning:
drivers/net/ethernet/smsc/smsc911x.c:2145:30:
warning: Using plain integer as NULL pointer

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
---
 drivers/net/ethernet/smsc/smsc911x.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
David Miller - March 19, 2013, 2:20 p.m.
From: Sachin Kamat <sachin.kamat@linaro.org>
Date: Tue, 19 Mar 2013 12:31:38 +0530

> Silences the following sparse warning:
> drivers/net/ethernet/smsc/smsc911x.c:2145:30:
> warning: Using plain integer as NULL pointer
> 
> Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>

Applied, thanks.
--
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/ethernet/smsc/smsc911x.c b/drivers/net/ethernet/smsc/smsc911x.c
index df77df1..3663b9e 100644
--- a/drivers/net/ethernet/smsc/smsc911x.c
+++ b/drivers/net/ethernet/smsc/smsc911x.c
@@ -2142,7 +2142,7 @@  static int smsc911x_init(struct net_device *dev)
 	spin_lock_init(&pdata->dev_lock);
 	spin_lock_init(&pdata->mac_lock);
 
-	if (pdata->ioaddr == 0) {
+	if (pdata->ioaddr == NULL) {
 		SMSC_WARN(pdata, probe, "pdata->ioaddr: 0x00000000");
 		return -ENODEV;
 	}