diff options
author | Eshan Kelkar <eshankelkar@galorithm.com> | 2023-01-12 19:32:45 +0530 |
---|---|---|
committer | Anastasia Klimchuk <aklm@chromium.org> | 2023-06-21 02:02:05 +0000 |
commit | 7887df98b38d011d52decdae0e5e02da15abd5ce (patch) | |
tree | e4c208847906b2c3529e2995deec01b646b1dc96 /flashchips.c | |
parent | 885f7923265e4e48f4bfc109f3723bb9167b75bc (diff) | |
download | flashrom-7887df98b38d011d52decdae0e5e02da15abd5ce.tar.gz flashrom-7887df98b38d011d52decdae0e5e02da15abd5ce.tar.bz2 flashrom-7887df98b38d011d52decdae0e5e02da15abd5ce.zip |
ichspi.c: Bug fix for ich_hwseq_get_flash_id
In ich_hwseq_get_flash_id, flash_id_to_entry would return
address of a structure present in flashchips array
corresponding to provided manufacture_id and model_id.
If this function returns NULL and if we don't return
after printing the warning using msg_pwarn, we'll be
dereferencing a NULL pointer, hence the return in that
if is provided.
Change-Id: I35c112cd032e3b94e30c347766764392d5bbfe3d
Signed-off-by: Eshan Kelkar <eshangalorithm@gmail.com>
Signed-off-by: Anastasia Klimchuk <aklm@flashrom.org>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/71872
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nikolai Artemiev <nartemiev@google.com>
Diffstat (limited to 'flashchips.c')
0 files changed, 0 insertions, 0 deletions