aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/e1000
diff options
context:
space:
mode:
authorMatt Macy <mmacy@FreeBSD.org>2018-05-04 18:59:01 +0000
committerMatt Macy <mmacy@FreeBSD.org>2018-05-04 18:59:01 +0000
commit8fd222ebb4be73c7478d44d4b415b634a1841f8b (patch)
treed5d71d012586a8102d4b33d4d1989b447b7e5513 /sys/dev/e1000
parent1ae4848cd0177755e88302ccb9afdd3ad69e68c1 (diff)
downloadsrc-8fd222ebb4be73c7478d44d4b415b634a1841f8b.tar.gz
src-8fd222ebb4be73c7478d44d4b415b634a1841f8b.zip
fix case where pidx_last might be used uninitialized
Reviewed by: sbruno
Notes
Notes: svn path=/head/; revision=333259
Diffstat (limited to 'sys/dev/e1000')
-rw-r--r--sys/dev/e1000/em_txrx.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/dev/e1000/em_txrx.c b/sys/dev/e1000/em_txrx.c
index 5344496a55f0..a1f51ba69586 100644
--- a/sys/dev/e1000/em_txrx.c
+++ b/sys/dev/e1000/em_txrx.c
@@ -401,7 +401,7 @@ em_isc_txd_encap(void *arg, if_pkt_info_t pi)
* needs End Of Packet (EOP)
* and Report Status (RS)
*/
- if (txd_flags) {
+ if (txd_flags && nsegs) {
txr->tx_rsq[txr->tx_rs_pidx] = pidx_last;
DPRINTF(iflib_get_dev(sc->ctx), "setting to RS on %d rs_pidx %d first: %d\n", pidx_last, txr->tx_rs_pidx, first);
txr->tx_rs_pidx = (txr->tx_rs_pidx+1) & (ntxd-1);