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: firefly_0821_release~7613^2~3600^2~31^2~135 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=6edc3242e35f03990e362e7c115e722717f0f7a7;p=firefly-linux-kernel-4.4.55.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);