arch: arm: mpu: fix _get_region_ap(.) function
This commit fixes a bug in _get_region_ap(.) by adding parentheses to enforce the correct operator precedence. Fixes #8864. Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
This commit is contained in:
parent
ac81eb0eca
commit
8bfddb52e5
1 changed files with 1 additions and 1 deletions
|
@ -225,7 +225,7 @@ static inline int _is_in_region(u32_t r_index, u32_t start, u32_t size)
|
|||
static inline u32_t _get_region_ap(u32_t r_index)
|
||||
{
|
||||
MPU->RNR = r_index;
|
||||
return MPU->RASR & MPU_RASR_AP_Msk >> MPU_RASR_AP_Pos;
|
||||
return (MPU->RASR & MPU_RASR_AP_Msk) >> MPU_RASR_AP_Pos;
|
||||
}
|
||||
|
||||
/* ARM Core MPU Driver API Implementation for ARM MPU */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue