[PATCH 2/3] staging: et131x: Zero frame descriptor length on exiting nic_rx_pkts()

Mark Einon mark.einon at gmail.com
Sat Oct 27 18:01:53 UTC 2012


The previous refactoring of nic_rx_pkts() changed the behaviour by no
longer zeroing rfd->len before exiting the function in one scenario.
Fix this by zeroing the length.

Reported-by: Dan Carpenter <dan.carpenter at oracle.com>
Signed-off-by: Mark Einon <mark.einon at gmail.com>
---
 drivers/staging/et131x/et131x.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/staging/et131x/et131x.c b/drivers/staging/et131x/et131x.c
index 4f4ee3e..84544fc 100644
--- a/drivers/staging/et131x/et131x.c
+++ b/drivers/staging/et131x/et131x.c
@@ -2832,8 +2832,10 @@ static struct rfd *nic_rx_pkts(struct et131x_adapter *adapter)
 		len = 0;
 	}
 
-	if (len == 0)
+	if (len == 0) {
+		rfd->len = 0;
 		goto out;
+	}
 
 	/* Determine if this is a multicast packet coming in */
 	if ((word0 & ALCATEL_MULTICAST_PKT) &&
-- 
1.7.9.5




More information about the devel mailing list