mirror of
https://github.com/fail0verflow/switch-coreboot.git
synced 2025-05-04 01:39:18 -04:00
UPSTREAM: vendorcode/siemens: Ensure a given info block is available for a field
While searching for a field in all blocks ensure that the checked block is available and can be used. In this way a field can be retrieved from every block and not just the first one. BUG=None BRANCH=None TEST=None Signed-off-by: Werner Zeh <werner.zeh@siemens.com> Reviewed-on: https://review.coreboot.org/17670 Tested-by: build bot (Jenkins) Reviewed-by: Mario Scheithauer <mario.scheithauer@siemens.com> Change-Id: Idbd7656ab0664763cb065f5e817193ad1d9e0871 Reviewed-on: https://chromium-review.googlesource.com/417091 Commit-Ready: Furquan Shaikh <furquan@chromium.org> Tested-by: Furquan Shaikh <furquan@chromium.org> Reviewed-by: Aaron Durbin <adurbin@chromium.org>
This commit is contained in:
parent
5a7e617031
commit
1a7b17c54f
1 changed files with 2 additions and 1 deletions
|
@ -396,7 +396,8 @@ static uint32_t hwilib_read_bytes (const struct param_info *param, uint8_t *dst,
|
|||
return 0;
|
||||
/* Take the first valid block to get the parameter from */
|
||||
do {
|
||||
if ((param->pos[i].len) && (param->pos[i].offset)) {
|
||||
if ((param->pos[i].len) && (param->pos[i].offset) &&
|
||||
(blk_ptr[param->pos[i].blk_type])) {
|
||||
blk = blk_ptr[param->pos[i].blk_type];
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue