bce(4): Avoid NULL pointer access, if no flash info could be found
authorSepherosa Ziehau <sephe@dragonflybsd.org>
Sat, 2 Jul 2011 11:28:55 +0000 (19:28 +0800)
committerSepherosa Ziehau <sephe@dragonflybsd.org>
Sat, 2 Jul 2011 12:05:27 +0000 (20:05 +0800)
Obtained-from: FreeBSD 210257

sys/dev/netif/bce/if_bce.c

index 9861832..fb10193 100644 (file)
@@ -1721,7 +1721,7 @@ bce_init_nvram(struct bce_softc *sc)
        if (j == entry_count) {
                sc->bce_flash_info = NULL;
                if_printf(&sc->arpcom.ac_if, "Unknown Flash NVRAM found!\n");
-               rc = ENODEV;
+               return ENODEV;
        }
 
 bce_init_nvram_get_flash_size: