mirror of https://github.com/acidanthera/audk.git
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:
parent
1da7616649
commit
e117c894fd
|
@ -1055,6 +1055,8 @@ SnpGetStatus (
|
||||||
LanDriver->Stats.TxTotalFrames += 1;
|
LanDriver->Stats.TxTotalFrames += 1;
|
||||||
*TxBuff = LanDriver->TxRing[PacketTag % LAN9118_TX_RING_NUM_ENTRIES];
|
*TxBuff = LanDriver->TxRing[PacketTag % LAN9118_TX_RING_NUM_ENTRIES];
|
||||||
}
|
}
|
||||||
|
} else if (TxBuff != NULL) {
|
||||||
|
*TxBuff = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check for a TX Error interrupt
|
// Check for a TX Error interrupt
|
||||||
|
|
Loading…
Reference in New Issue