From: Chris Wilson Date: Sun, 12 Sep 2010 16:16:17 +0000 (+0100) Subject: drm/i915/bios: Prevent NULL dereference after allocation failure X-Git-Tag: v2.6.37-rc1~92^2~28^2~135 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=6edc3242e35f03990e362e7c115e722717f0f7a7;p=karo-tx-linux.git drm/i915/bios: Prevent NULL dereference after allocation failure Signed-off-by: Chris Wilson --- 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, ((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);