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>
This commit is contained in:
Michael Brown 2016-05-11 22:50:09 +01:00 committed by Ard Biesheuvel
parent 1da7616649
commit e117c894fd
1 changed files with 2 additions and 0 deletions

View File

@ -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