Commit 536552c
llext: fix virtual memory region looping
The check virtual_region == NULL after a
SYS_MM_DRV_MEMORY_REGION_FOREACH(virtual_memory_regions, virtual_region) {}
loop is wrong and useless - the only way virtual_region can be NULL
is if virtual_memory_regions == NULL and in that case the
SYS_MM_DRV_MEMORY_REGION_FOREACH() loop will cause an immediate
exception. Fix this by checking virtual_memory_regions != NULL before
the loop.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>1 parent a42ee0d commit 536552c
1 file changed
+5
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
251 | 251 | | |
252 | 252 | | |
253 | 253 | | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
254 | 257 | | |
255 | 258 | | |
256 | 259 | | |
257 | 260 | | |
258 | | - | |
| 261 | + | |
| 262 | + | |
259 | 263 | | |
260 | 264 | | |
261 | 265 | | |
| |||
0 commit comments