diff --git a/sys/dev/pci/vga_pci.c b/sys/dev/pci/vga_pci.c --- a/sys/dev/pci/vga_pci.c +++ b/sys/dev/pci/vga_pci.c @@ -438,7 +438,7 @@ */ vr = lookup_res(device_get_softc(dev), *rid); if (vr == NULL) - return (NULL); + break; if (vr->vr_res == NULL) vr->vr_res = bus_alloc_resource(dev, type, rid, start, end, count, flags); @@ -464,7 +464,7 @@ */ vr = lookup_res(device_get_softc(dev), rman_get_rid(r)); if (vr == NULL) - return (EINVAL); + break; if (vr->vr_res == NULL) return (EINVAL); KASSERT(vr->vr_res == r, ("vga_pci resource mismatch"));