qcacmn: Fix minor pn_size init and index check

1. In hal reo setup initialize pn_size to avoid uninitialization
in default case.
2. In hal validate shadow register function, fix the check
for index as shadow_config array can take 0 to 35 as index values.

Change-Id: I8b729dc70053e333ef659ba38fb0c2f66cd8b35a
CRs-fixed: 2208799
This commit is contained in:
sumedh baikady
2018-03-19 17:48:41 -07:00
committed by nshrivas
parent 6fcc790e98
commit 668d8679ff
2 changed files with 3 additions and 2 deletions

View File

@@ -680,7 +680,7 @@ static void hal_validate_shadow_register(struct hal_soc *hal,
index = shadow_address - shadow_0_offset;
if (index > MAX_SHADOW_REGISTERS) {
if (index >= MAX_SHADOW_REGISTERS) {
QDF_TRACE(QDF_MODULE_ID_TXRX, QDF_TRACE_LEVEL_ERROR,
"%s: index %x out of bounds\n", __func__, index);
goto error;