diff mbox

af_packet: Quiet sparse noise about using plain integer as NULL pointer

Message ID 1344306430-30450-1-git-send-email-ying.xue@windriver.com
State Accepted, archived
Delegated to: David Miller
Headers show

Commit Message

Ying Xue Aug. 7, 2012, 2:27 a.m. UTC
Quiets the sparse warning:
warning: Using plain integer as NULL pointer

Signed-off-by: Ying Xue <ying.xue@windriver.com>
---
 net/packet/af_packet.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Comments

David Miller Aug. 8, 2012, 10:43 p.m. UTC | #1
From: Ying Xue <ying.xue@windriver.com>
Date: Tue, 7 Aug 2012 10:27:10 +0800

> Quiets the sparse warning:
> warning: Using plain integer as NULL pointer
> 
> Signed-off-by: Ying Xue <ying.xue@windriver.com>

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
diff mbox

Patch

diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c
index ceaca7c..f016f66 100644
--- a/net/packet/af_packet.c
+++ b/net/packet/af_packet.c
@@ -1079,7 +1079,7 @@  static void *packet_current_rx_frame(struct packet_sock *po,
 	default:
 		WARN(1, "TPACKET version not supported\n");
 		BUG();
-		return 0;
+		return NULL;
 	}
 }