drm/edid: don't return stack garbage from supports_rb
authorDaniel Vetter <daniel.vetter@ffwll.ch>
Tue, 19 Jun 2012 09:33:06 +0000 (11:33 +0200)
committerBen Hutchings <ben@decadent.org.uk>
Wed, 4 Jul 2012 04:44:15 +0000 (05:44 +0100)
commit b196a4980ff7bb54db478e2a408dc8b12be15304 upstream.

We need to initialize this to false, because the is_rb callback only
ever sets it to true.

Noticed while reading through the code.

Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
drivers/gpu/drm/drm_edid.c

index 3e927ce..a1ee634 100644 (file)
@@ -585,7 +585,7 @@ static bool
 drm_monitor_supports_rb(struct edid *edid)
 {
        if (edid->revision >= 4) {
 drm_monitor_supports_rb(struct edid *edid)
 {
        if (edid->revision >= 4) {
-               bool ret;
+               bool ret = false;
                drm_for_each_detailed_block((u8 *)edid, is_rb, &ret);
                return ret;
        }
                drm_for_each_detailed_block((u8 *)edid, is_rb, &ret);
                return ret;
        }