Initialise vhdr to prevent its use when uninitialised.
This issue was found with Smatch.
Fixes: e058176be32b (android: boot: add vendor boot image to prepare for v3, v4 support)
Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@kernel.org>
Link: https://lore.kernel.org/r/20250625-abootimg_fix-v4-2-df7af00e87b0@linaro.org
Signed-off-by: Mattijs Korpershoek <mkorpershoek@kernel.org>
{
struct andr_image_data img_data;
const struct andr_boot_img_hdr_v0 *hdr;
- const struct andr_vnd_boot_img_hdr *vhdr;
+ const struct andr_vnd_boot_img_hdr *vhdr = NULL;
hdr = map_sysmem(hdr_addr, sizeof(*hdr));
if (vendor_boot_img != -1)