summaryrefslogtreecommitdiff
path: root/sys/src/9/pc/etherm10g.c
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@centraldogma>2011-12-12 22:24:25 +0100
committercinap_lenrek <cinap_lenrek@centraldogma>2011-12-12 22:24:25 +0100
commit9679d7525c205de90e9dcadcf6762b04114f8c45 (patch)
tree8681e308104e48eed2753c1b76eba1a8bac57341 /sys/src/9/pc/etherm10g.c
parentf32ef135d4bce251f72275d30cfcd86cb188b8c9 (diff)
kernel: fix more malloc bugs
Diffstat (limited to 'sys/src/9/pc/etherm10g.c')
-rw-r--r--sys/src/9/pc/etherm10g.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/src/9/pc/etherm10g.c b/sys/src/9/pc/etherm10g.c
index f759c99c0..a3bde6031 100644
--- a/sys/src/9/pc/etherm10g.c
+++ b/sys/src/9/pc/etherm10g.c
@@ -1564,8 +1564,10 @@ m10gpci(void)
continue;
}
c = malloc(sizeof *c);
- if(c == nil)
+ if(c == nil){
+ print("etherm10g: can't allocate memory\n");
continue;
+ }
c->pcidev = p;
c->id = p->did<<16 | p->vid;
c->boot = pcicap(p, PciCapVND);