1 --- a/drivers/net/ethernet/broadcom/bgmac.c
2 +++ b/drivers/net/ethernet/broadcom/bgmac.c
3 @@ -909,9 +909,9 @@ static void bgmac_chip_reset(struct bgma
5 u8 sw_type = BGMAC_CHIPCTL_1_SW_TYPE_EPHY |
6 BGMAC_CHIPCTL_1_IF_TYPE_MII;
10 - if (bcm47xx_nvram_getenv("et_swtype", buf, 1) > 0) {
11 + if (bcm47xx_nvram_getenv("et_swtype", buf, sizeof(buf)) > 0) {
12 if (kstrtou8(buf, 0, &et_swtype))
13 bgmac_err(bgmac, "Failed to parse et_swtype (%s)\n",