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)
committerDave Airlie <airlied@redhat.com>
Thu, 21 Jun 2012 08:34:13 +0000 (09:34 +0100)
We need to initialize this to false, because the is_rb callback only
ever sets it to true.

Noticed while reading through the code.

Cc: stable@vger.kernel.org
Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/drm_edid.c

index eb92fe257a3937441a35ac01ec8dd414ee4d57d3..5873e481e5d2dadde3c16e0e0883d8e6e3340dbe 100644 (file)
@@ -610,7 +610,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;
        }