diff options
| -rw-r--r-- | drivers/net/wireless/marvell/mwifiex/sdio.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/wireless/marvell/mwifiex/sdio.c b/drivers/net/wireless/marvell/mwifiex/sdio.c index f039d6f19183..c15d6e1dd8f6 100644 --- a/drivers/net/wireless/marvell/mwifiex/sdio.c +++ b/drivers/net/wireless/marvell/mwifiex/sdio.c @@ -2795,6 +2795,9 @@ static void mwifiex_sdio_fw_dump(struct mwifiex_adapter *adapter) mwifiex_dbg(adapter, ERROR, "SDIO read memory length err\n"); goto done; } + /* Limit the dump count to the memory table size */ + if (dump_num > ARRAY_SIZE(mem_type_mapping_tbl)) + dump_num = ARRAY_SIZE(mem_type_mapping_tbl); /* Read the length of every memory which will dump */ for (idx = 0; idx < dump_num; idx++) { |
