diff options
| author | Luigi Rizzo <luigi@FreeBSD.org> | 2001-12-04 02:30:53 +0000 |
|---|---|---|
| committer | Luigi Rizzo <luigi@FreeBSD.org> | 2001-12-04 02:30:53 +0000 |
| commit | 40129585e3324f43c0e73e819e3ebb35be2cd915 (patch) | |
| tree | a0df8d92b78cc61f8d937b424c097357d58c1497 /sys | |
| parent | 1c4c22583c465b6502bea0f73f20762c218d72c1 (diff) | |
Notes
Diffstat (limited to 'sys')
| -rw-r--r-- | sys/dev/dc/if_dc.c | 12 | ||||
| -rw-r--r-- | sys/pci/if_dc.c | 12 | ||||
| -rw-r--r-- | sys/pci/if_sis.c | 7 |
3 files changed, 5 insertions, 26 deletions
diff --git a/sys/dev/dc/if_dc.c b/sys/dev/dc/if_dc.c index 4506fe832244..05d2ff612e0d 100644 --- a/sys/dev/dc/if_dc.c +++ b/sys/dev/dc/if_dc.c @@ -2272,16 +2272,11 @@ static int dc_newbuf(sc, i, m) if (m == NULL) { MGETHDR(m_new, M_DONTWAIT, MT_DATA); - if (m_new == NULL) { - printf("dc%d: no memory for rx list " - "-- packet dropped!\n", sc->dc_unit); + if (m_new == NULL) return(ENOBUFS); - } MCLGET(m_new, M_DONTWAIT); if (!(m_new->m_flags & M_EXT)) { - printf("dc%d: no memory for rx list " - "-- packet dropped!\n", sc->dc_unit); m_freem(m_new); return(ENOBUFS); } @@ -2949,15 +2944,12 @@ static int dc_coal(sc, m_head) m = *m_head; MGETHDR(m_new, M_DONTWAIT, MT_DATA); - if (m_new == NULL) { - printf("dc%d: no memory for tx list", sc->dc_unit); + if (m_new == NULL) return(ENOBUFS); - } if (m->m_pkthdr.len > MHLEN) { MCLGET(m_new, M_DONTWAIT); if (!(m_new->m_flags & M_EXT)) { m_freem(m_new); - printf("dc%d: no memory for tx list", sc->dc_unit); return(ENOBUFS); } } diff --git a/sys/pci/if_dc.c b/sys/pci/if_dc.c index 4506fe832244..05d2ff612e0d 100644 --- a/sys/pci/if_dc.c +++ b/sys/pci/if_dc.c @@ -2272,16 +2272,11 @@ static int dc_newbuf(sc, i, m) if (m == NULL) { MGETHDR(m_new, M_DONTWAIT, MT_DATA); - if (m_new == NULL) { - printf("dc%d: no memory for rx list " - "-- packet dropped!\n", sc->dc_unit); + if (m_new == NULL) return(ENOBUFS); - } MCLGET(m_new, M_DONTWAIT); if (!(m_new->m_flags & M_EXT)) { - printf("dc%d: no memory for rx list " - "-- packet dropped!\n", sc->dc_unit); m_freem(m_new); return(ENOBUFS); } @@ -2949,15 +2944,12 @@ static int dc_coal(sc, m_head) m = *m_head; MGETHDR(m_new, M_DONTWAIT, MT_DATA); - if (m_new == NULL) { - printf("dc%d: no memory for tx list", sc->dc_unit); + if (m_new == NULL) return(ENOBUFS); - } if (m->m_pkthdr.len > MHLEN) { MCLGET(m_new, M_DONTWAIT); if (!(m_new->m_flags & M_EXT)) { m_freem(m_new); - printf("dc%d: no memory for tx list", sc->dc_unit); return(ENOBUFS); } } diff --git a/sys/pci/if_sis.c b/sys/pci/if_sis.c index c4ac1407d744..b123fa970495 100644 --- a/sys/pci/if_sis.c +++ b/sys/pci/if_sis.c @@ -1217,16 +1217,11 @@ static int sis_newbuf(sc, c, m) if (m == NULL) { MGETHDR(m_new, M_DONTWAIT, MT_DATA); - if (m_new == NULL) { - printf("sis%d: no memory for rx list " - "-- packet dropped!\n", sc->sis_unit); + if (m_new == NULL) return(ENOBUFS); - } MCLGET(m_new, M_DONTWAIT); if (!(m_new->m_flags & M_EXT)) { - printf("sis%d: no memory for rx list " - "-- packet dropped!\n", sc->sis_unit); m_freem(m_new); return(ENOBUFS); } |
