drm/radeon: Fix stack data leak
authorJean Delvare <khali@linux-fr.org>
Sun, 15 Aug 2010 12:11:24 +0000 (14:11 +0200)
committerDave Airlie <airlied@redhat.com>
Thu, 19 Aug 2010 22:43:20 +0000 (08:43 +1000)
commit1d978dac7e99bd551df5001f0cc92369054dca0d
treebb57aad4433b0b4aeef19470037cc742c2bfbdcf
parent2cbeb4efc2b9739fe6019b613ae658bd2119a3eb
drm/radeon: Fix stack data leak

Always zero-init a structure on the stack which is returned by a
function. Otherwise you may leak random stack data from previous
function calls.

This fixes the following warning I was seeing:
  CC [M]  drivers/gpu/drm/radeon/radeon_atombios.o
drivers/gpu/drm/radeon/radeon_atombios.c: In function "radeon_atom_get_hpd_info_from_gpio":
drivers/gpu/drm/radeon/radeon_atombios.c:261: warning: "hpd.plugged_state" is used uninitialized in this function

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: David Airlie <airlied@linux.ie>
Cc: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/radeon/radeon_atombios.c