From: Sepherosa Ziehau Date: Sat, 2 Jul 2011 11:28:55 +0000 (+0800) Subject: bce(4): Avoid NULL pointer access, if no flash info could be found X-Git-Tag: v2.12.0~399 X-Git-Url: https://gitweb.dragonflybsd.org/dragonfly.git/commitdiff_plain/d819a615e0b45d066b3f1e217ecd64efbb840f29 bce(4): Avoid NULL pointer access, if no flash info could be found Obtained-from: FreeBSD 210257 --- diff --git a/sys/dev/netif/bce/if_bce.c b/sys/dev/netif/bce/if_bce.c index 9861832af6..fb1019375c 100644 --- a/sys/dev/netif/bce/if_bce.c +++ b/sys/dev/netif/bce/if_bce.c @@ -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: