Skip to content

Commit

Permalink
Even if you try very hard, some cards just do not have a BIOS.
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinHusemann committed Mar 22, 2019
1 parent d50f102 commit f3976a7
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions sys/dev/pci/radeonfb.c
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -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>
Expand Down Expand Up @@ -1402,6 +1402,9 @@ radeonfb_loadbios(struct radeonfb_softc *sc, const struct pci_attach_args *pa)
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);
Expand Down

0 comments on commit f3976a7

Please sign in to comment.