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:
@@ -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;
|
||||
|
Reference in New Issue
Block a user