diff options
Diffstat (limited to 'sys/src/9/pc/uartaxp.c')
| -rw-r--r-- | sys/src/9/pc/uartaxp.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/src/9/pc/uartaxp.c b/sys/src/9/pc/uartaxp.c index 53551502d..a244be278 100644 --- a/sys/src/9/pc/uartaxp.c +++ b/sys/src/9/pc/uartaxp.c @@ -763,6 +763,10 @@ axpalloc(int ctlrno, Pcidev* pcidev) int i, n, timeo; ctlr = malloc(sizeof(Ctlr)); + if(ctlr == nil){ + print("uartaxp: can't allocate memory\n"); + return nil; + } seprint(name, name+sizeof(name), "uartaxp%d", ctlrno); kstrdup(&ctlr->name, name); ctlr->pcidev = pcidev; |
