aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/intel_bios.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2010-09-12 12:16:17 -0400
committerChris Wilson <chris@chris-wilson.co.uk>2010-09-12 12:46:14 -0400
commit6edc3242e35f03990e362e7c115e722717f0f7a7 (patch)
tree0f6e9557713991a742e2b66628b89321877b1d4e /drivers/gpu/drm/i915/intel_bios.c
parentb5c616a75428d85f92407e4509553f937b720630 (diff)
drm/i915/bios: Prevent NULL dereference after allocation failure
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'drivers/gpu/drm/i915/intel_bios.c')
-rw-r--r--drivers/gpu/drm/i915/intel_bios.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/intel_bios.c b/drivers/gpu/drm/i915/intel_bios.c
index 8d7deca69830..8986a4b898db 100644
--- a/drivers/gpu/drm/i915/intel_bios.c
+++ b/drivers/gpu/drm/i915/intel_bios.c
@@ -169,6 +169,8 @@ parse_lfp_panel_data(struct drm_i915_private *dev_priv,
169 ((unsigned char *)entry + dvo_timing_offset); 169 ((unsigned char *)entry + dvo_timing_offset);
170 170
171 panel_fixed_mode = kzalloc(sizeof(*panel_fixed_mode), GFP_KERNEL); 171 panel_fixed_mode = kzalloc(sizeof(*panel_fixed_mode), GFP_KERNEL);
172 if (!panel_fixed_mode)
173 return;
172 174
173 fill_detail_timing_data(panel_fixed_mode, dvo_timing); 175 fill_detail_timing_data(panel_fixed_mode, dvo_timing);
174 176