summaryrefslogtreecommitdiff
path: root/EmbeddedPkg/Drivers
diff options
context:
space:
mode:
authorMichael Brown <mcb30@ipxe.org>2016-05-11 22:50:09 +0100
committerArd Biesheuvel <ard.biesheuvel@linaro.org>2016-05-12 10:01:17 +0200
commite117c894fdf1896fea5d37057832fed58d48b6ee (patch)
tree159685425cb7b3f417a5ec9744dffbf616b8a1a7 /EmbeddedPkg/Drivers
parent1da7616649491b054025fc2928211f577fbf2691 (diff)
downloadedk2-e117c894fdf1896fea5d37057832fed58d48b6ee.zip
edk2-e117c894fdf1896fea5d37057832fed58d48b6ee.tar.gz
edk2-e117c894fdf1896fea5d37057832fed58d48b6ee.tar.bz2
EmbeddedPkg/Lan9118Dxe: Do not return uninitialised TxBuff
Conform to the specification for GetStatus(), which states that "if there are no transmit buffers to recycle and TxBuf is not NULL, *TxBuf will be set to NULL". Cc: Leif Lindholm <leif.lindholm@linaro.org> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Michael Brown <mcb30@ipxe.org> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Diffstat (limited to 'EmbeddedPkg/Drivers')
-rw-r--r--EmbeddedPkg/Drivers/Lan9118Dxe/Lan9118Dxe.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/EmbeddedPkg/Drivers/Lan9118Dxe/Lan9118Dxe.c b/EmbeddedPkg/Drivers/Lan9118Dxe/Lan9118Dxe.c
index 8af23df..aabaf60 100644
--- a/EmbeddedPkg/Drivers/Lan9118Dxe/Lan9118Dxe.c
+++ b/EmbeddedPkg/Drivers/Lan9118Dxe/Lan9118Dxe.c
@@ -1055,6 +1055,8 @@ SnpGetStatus (
LanDriver->Stats.TxTotalFrames += 1;
*TxBuff = LanDriver->TxRing[PacketTag % LAN9118_TX_RING_NUM_ENTRIES];
}
+ } else if (TxBuff != NULL) {
+ *TxBuff = NULL;
}
// Check for a TX Error interrupt