Commit 7ed2d915 authored by Gianfranco Trad's avatar Gianfranco Trad Committed by Paolo Abeni
Browse files

qed: fix possible uninit pointer read in qed_mcp_nvm_info_populate()

Coverity reports an uninit pointer read in qed_mcp_nvm_info_populate().
If EOPNOTSUPP is returned from qed_mcp_bist_nvm_get_num_images() ensure
nvm_info.num_images is set to 0 to avoid possible uninit assignment
to p_hwfn->nvm_info.image_att later on in out label.

Closes: https://scan5.scan.coverity.com/#/project-view/63204/10063?selectedIssue=1636666


Suggested-by: default avatarSimon Horman <horms@kernel.org>
Signed-off-by: default avatarGianfranco Trad <gianf.trad@gmail.com>
Reviewed-by: default avatarSimon Horman <horms@kernel.org>
Link: https://patch.msgid.link/20241215011733.351325-2-gianf.trad@gmail.com


Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
parent 0cb2c504
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment