Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 328015
b: refs/heads/master
c: e562154
h: refs/heads/master
i:
  328013: 7e7d5b0
  328011: d2c4ba6
  328007: 380a192
  327999: 519c6eb
v: v3
  • Loading branch information
Ben Hutchings committed Sep 19, 2012
1 parent 479c407 commit 0a417a0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e3f5ec1108ee01b555d5894722884e40dbec058f
refs/heads/master: e5621545e2461730af23054f355d348109881eb9
4 changes: 3 additions & 1 deletion trunk/drivers/net/ethernet/sfc/mtd.c
Original file line number Diff line number Diff line change
Expand Up @@ -585,6 +585,7 @@ static const struct siena_nvram_type_info siena_nvram_types[] = {
[MC_CMD_NVRAM_TYPE_EXP_ROM_CFG_PORT1] = { 1, "sfc_exp_rom_cfg" },
[MC_CMD_NVRAM_TYPE_PHY_PORT0] = { 0, "sfc_phy_fw" },
[MC_CMD_NVRAM_TYPE_PHY_PORT1] = { 1, "sfc_phy_fw" },
[MC_CMD_NVRAM_TYPE_FPGA] = { 0, "sfc_fpga" },
};

static int siena_mtd_probe_partition(struct efx_nic *efx,
Expand All @@ -598,7 +599,8 @@ static int siena_mtd_probe_partition(struct efx_nic *efx,
bool protected;
int rc;

if (type >= ARRAY_SIZE(siena_nvram_types))
if (type >= ARRAY_SIZE(siena_nvram_types) ||
siena_nvram_types[type].name == NULL)
return -ENODEV;

info = &siena_nvram_types[type];
Expand Down

0 comments on commit 0a417a0

Please sign in to comment.