lib/edid: Zero struct only when used
Change-Id: I1c14e7458153fb992b17f30d7015321fae533bb2 Signed-off-by: Paul Menzel <pmenzel@molgen.mpg.de> Reviewed-on: https://review.coreboot.org/c/coreboot/+/38913 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Patrick Georgi <pgeorgi@google.com>
This commit is contained in:
parent
433bf770fc
commit
1ced4e64b0
|
@ -1138,8 +1138,6 @@ int decode_edid(unsigned char *edid, int size, struct edid *out)
|
|||
.conformant = EDID_CONFORMANT,
|
||||
};
|
||||
|
||||
memset(out, 0, sizeof(*out));
|
||||
|
||||
if (!edid) {
|
||||
printk(BIOS_ERR, "No EDID found\n");
|
||||
return EDID_ABSENT;
|
||||
|
@ -1152,6 +1150,8 @@ int decode_edid(unsigned char *edid, int size, struct edid *out)
|
|||
return EDID_ABSENT;
|
||||
}
|
||||
|
||||
memset(out, 0, sizeof(*out));
|
||||
|
||||
if (manufacturer_name(edid + 0x08, out->manufacturer_name))
|
||||
c.manufacturer_name_well_formed = 1;
|
||||
|
||||
|
|
Loading…
Reference in New Issue