Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/pci agp_generic_bind_memory(): Don't return NULL if ...



details:   https://anonhg.NetBSD.org/src/rev/8b8783fdb724
branches:  trunk
changeset: 515108:8b8783fdb724
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Sun Sep 16 18:33:08 2001 +0000

description:
agp_generic_bind_memory(): Don't return NULL if we can't malloc
memory, return ENOMEM.

diffstat:

 sys/dev/pci/agp.c |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (18 lines):

diff -r 430fe23e0dd8 -r 8b8783fdb724 sys/dev/pci/agp.c
--- a/sys/dev/pci/agp.c Sun Sep 16 18:09:58 2001 +0000
+++ b/sys/dev/pci/agp.c Sun Sep 16 18:33:08 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: agp.c,v 1.9 2001/09/15 18:03:35 thorpej Exp $  */
+/*     $NetBSD: agp.c,v 1.10 2001/09/16 18:33:08 thorpej Exp $ */
 
 /*-
  * Copyright (c) 2000 Doug Rabson
@@ -502,7 +502,7 @@
                nseg = (mem->am_size / (contigpages * PAGE_SIZE)) + 1;
                segs = malloc(nseg * sizeof *segs, M_AGP, M_WAITOK);
                if (segs == NULL)
-                       return NULL;
+                       return ENOMEM;
                if (bus_dmamem_alloc(sc->as_dmat, mem->am_size, PAGE_SIZE, 0,
                                     segs, nseg, &mem->am_nseg,
                                     BUS_DMA_WAITOK) != 0) {



Home | Main Index | Thread Index | Old Index