]> git.proxmox.com Git - mirror_edk2.git/commitdiff
EmbeddedPkg/Lan9118Dxe: Do not return uninitialised TxBuff
authorMichael Brown <mcb30@ipxe.org>
Wed, 11 May 2016 21:50:09 +0000 (22:50 +0100)
committerArd Biesheuvel <ard.biesheuvel@linaro.org>
Thu, 12 May 2016 08:01:17 +0000 (10:01 +0200)
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>
EmbeddedPkg/Drivers/Lan9118Dxe/Lan9118Dxe.c

index 8af23df394f63744f8653914a3655291366191ae..aabaf604f6faf6abbf472a9603657e440e97e38b 100644 (file)
@@ -1055,6 +1055,8 @@ SnpGetStatus (
       LanDriver->Stats.TxTotalFrames += 1;\r
       *TxBuff = LanDriver->TxRing[PacketTag % LAN9118_TX_RING_NUM_ENTRIES];\r
     }\r
+  } else if (TxBuff != NULL) {\r
+    *TxBuff = NULL;\r
   }\r
 \r
   // Check for a TX Error interrupt\r