summaryrefslogtreecommitdiff
path: root/drivers/gpu
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2014-09-08 10:33:32 +1000
committerJiri Slaby <jslaby@suse.cz>2014-11-13 19:02:24 +0100
commit5a14c978fed450baabf93cec388743b1de8b4b41 (patch)
tree0c8d39ee6ab387be1e99fd32886c98b6af6973b2 /drivers/gpu
parent3055e72f042a7e5566f02ca2be609426ba6f6efa (diff)
downloadlwn-5a14c978fed450baabf93cec388743b1de8b4b41.tar.gz
lwn-5a14c978fed450baabf93cec388743b1de8b4b41.zip
drm/nouveau/bios: memset dcb struct to zero before parsing
commit 595d373f1e9c9ce0fc946457fdb488e8a58972cd upstream. Fixes type/mask calculation being based on uninitialised data for VGA outputs. Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/nouveau/core/subdev/bios/dcb.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpu/drm/nouveau/core/subdev/bios/dcb.c b/drivers/gpu/drm/nouveau/core/subdev/bios/dcb.c
index 2d9b9d7a7992..f3edd2841f2d 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);