drm/i915/bios: Prevent NULL dereference after allocation failure
authorChris Wilson <chris@chris-wilson.co.uk>
Sun, 12 Sep 2010 16:16:17 +0000 (17:16 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Sun, 12 Sep 2010 16:46:14 +0000 (17:46 +0100)
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
drivers/gpu/drm/i915/intel_bios.c

index 8d7deca698302a29e8b6b5734e3a015bde622208..8986a4b898dbc54291ed3b114e736f6bb5e4a251 100644 (file)
@@ -169,6 +169,8 @@ parse_lfp_panel_data(struct drm_i915_private *dev_priv,
                        ((unsigned char *)entry + dvo_timing_offset);
 
        panel_fixed_mode = kzalloc(sizeof(*panel_fixed_mode), GFP_KERNEL);
+       if (!panel_fixed_mode)
+               return;
 
        fill_detail_timing_data(panel_fixed_mode, dvo_timing);