Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/pci Even if you try very hard, some cards just do no...



details:   https://anonhg.NetBSD.org/src/rev/82d79771e2c9
branches:  trunk
changeset: 449778:82d79771e2c9
user:      martin <martin%NetBSD.org@localhost>
date:      Fri Mar 22 07:41:41 2019 +0000

description:
Even if you try very hard, some cards just do not have a BIOS.

diffstat:

 sys/dev/pci/radeonfb.c |  7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diffs (28 lines):

diff -r 8a78c4258129 -r 82d79771e2c9 sys/dev/pci/radeonfb.c
--- a/sys/dev/pci/radeonfb.c    Fri Mar 22 07:25:15 2019 +0000
+++ b/sys/dev/pci/radeonfb.c    Fri Mar 22 07:41:41 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: radeonfb.c,v 1.102 2019/03/21 17:40:36 macallan Exp $ */
+/*     $NetBSD: radeonfb.c,v 1.103 2019/03/22 07:41:41 martin Exp $ */
 
 /*-
  * Copyright (c) 2006 Itronix Inc.
@@ -70,7 +70,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: radeonfb.c,v 1.102 2019/03/21 17:40:36 macallan Exp $");
+__KERNEL_RCSID(0, "$NetBSD: radeonfb.c,v 1.103 2019/03/22 07:41:41 martin Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -1402,6 +1402,9 @@
        pci_find_rom(pa, romt, romh, romsz, PCI_ROM_CODE_TYPE_X86, &biosh,
            &sc->sc_biossz);
 
+       if (sc->sc_biossz == 0 || sc->sc_bios == NULL)
+               return;
+
 foundit:
        if (sc->sc_biossz > 0) {
                sc->sc_bios = malloc(sc->sc_biossz, M_DEVBUF, M_WAITOK);



Home | Main Index | Thread Index | Old Index