From: Chris Wilson Date: Fri, 27 Nov 2009 13:06:56 +0000 (+0000) Subject: drm/i915: Avoid NULL dereference with component_only tv_modes X-Git-Tag: v2.6.33-rc1~323^2~5^2~30 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d271817baecbccb47da0d9f28c285a0dae8a06b7;p=pandora-kernel.git drm/i915: Avoid NULL dereference with component_only tv_modes In commit d2d9f2324, the guard for a valid video mode was removed. This caused the regression: kernel crash during kms graphic boot on Intel GM4500 platform https://bugzilla.redhat.com/show_bug.cgi?id=540218 This patches changes the logic slightly not to rely on a coupled variable, but to just check whether the video_modes is valid before dereferencing. Signed-off-by: Chris Wilson Cc: David Woodhouse Cc: Zhenyu Wang [ickle: Actually reference the correct bug report] Acked-by: Zhenyu Wang Signed-off-by: Eric Anholt --- Reading git-diff-tree failed