From: Ben Skeggs Date: Mon, 8 Sep 2014 00:33:32 +0000 (+1000) Subject: drm/nouveau/bios: memset dcb struct to zero before parsing X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=595d373f1e9c9ce0fc946457fdb488e8a58972cd;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git drm/nouveau/bios: memset dcb struct to zero before parsing Fixes type/mask calculation being based on uninitialised data for VGA outputs. Signed-off-by: Ben Skeggs --- diff --git a/drivers/gpu/drm/nouveau/core/subdev/bios/dcb.c b/drivers/gpu/drm/nouveau/core/subdev/bios/dcb.c index 88606bfaf847..bd8d348385b3 100644 --- a/drivers/gpu/drm/nouveau/core/subdev/bios/dcb.c +++ b/drivers/gpu/drm/nouveau/core/subdev/bios/dcb.c @@ -124,6 +124,7 @@ dcb_outp_parse(struct nouveau_bios *bios, u8 idx, u8 *ver, u8 *len, struct dcb_output *outp) { u16 dcb = dcb_outp(bios, idx, ver, len); + memset(outp, 0x00, sizeof(*outp)); if (dcb) { if (*ver >= 0x20) { u32 conn = nv_ro32(bios, dcb + 0x00);