ether82557: panic() if receive buffer allocation fails on init

This commit is contained in:
cinap_lenrek 2013-06-01 01:42:39 +02:00
parent f7ffca5c1c
commit aedb35af2c

View file

@ -783,6 +783,8 @@ ctlrinit(Ctlr* ctlr)
link = NullPointer;
for(i = 0; i < Nrfd; i++){
bp = rfdalloc(link);
if(bp == nil)
panic("i82557: can't allocate rfd buffer");
if(ctlr->rfdhead == nil)
ctlr->rfdtail = bp;
bp->next = ctlr->rfdhead;