When we didn't find a matching flash device, do not touch flash

config data. While I'm here, use return code of bce_init_nvram()
to set error instead of directly setting ENODEV.

Reviewed by:	davidch
This commit is contained in:
yongari 2010-07-19 21:13:07 +00:00
parent aad8c00558
commit 098866995f

View File

@ -2264,7 +2264,8 @@ bce_init_nvram(struct bce_softc *sc)
sc->bce_flash_info = NULL;
BCE_PRINTF("%s(%d): Unknown Flash NVRAM found!\n",
__FILE__, __LINE__);
rc = ENODEV;
DBEXIT(BCE_VERBOSE_NVRAM);
return (ENODEV);
}
bce_init_nvram_get_flash_size:
@ -4796,10 +4797,8 @@ bce_chipinit(struct bce_softc *sc)
}
/* Prepare NVRAM for access. */
if (bce_init_nvram(sc)) {
rc = ENODEV;
if ((rc = bce_init_nvram(sc)) != 0)
goto bce_chipinit_exit;
}
/* Set the kernel bypass block size */
val = REG_RD(sc, BCE_MQ_CONFIG);