Subject: [PATCH 2/2] ibmveth: make sure skb is not null

From: Wang Chen <[email-masked]>
Date: Tue, 20 May 2008 17:23:44 +0800

There is no assurance to guarantee ibmveth_rxq_get_buffer won't return a NULL.
So add an assertion here.

No device, not tested.

Signed-off-by: Wang Chen <[email-masked]>
---
 drivers/net/ibmveth.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/net/ibmveth.c b/drivers/net/ibmveth.c
index 0052780..9d1523a 100644
--- a/drivers/net/ibmveth.c
+++ b/drivers/net/ibmveth.c
@@ -945,6 +945,7 @@ static int ibmveth_poll(struct napi_struct *napi, int budget)
 			int csum_good = ibmveth_rxq_csum_good(adapter);
 
 			skb = ibmveth_rxq_get_buffer(adapter);
+			ibmveth_assert(skb != NULL);
 			if (csum_good)
 				skb->ip_summed = CHECKSUM_UNNECESSARY;
 
-- 
1.5.3.4