]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 16 Jul 2012 15:47:39 +0000 (08:47 -0700)
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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpu/drm/drm_edid.c

index 1bbb85b9ce4e8aa6d5ca754da7d2d0df57b65140..a303b613a170e406ff40800ada148fce1121dcd6 100644 (file)
@@ -584,7 +584,7 @@ static bool
 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;
        }