diff options
author | Alan Cox <alan@linux.intel.com> | 2011-07-05 14:45:00 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-07-05 15:20:45 (GMT) |
commit | 398c44248984a18876059724519f87c79b859deb (patch) | |
tree | 3cf928d95e9d4033ebe0f9853c7f273668b5fb54 /drivers | |
parent | 52b6ba09eeba5d48dd8f20cf07a85e81b7acacf4 (diff) | |
download | linux-398c44248984a18876059724519f87c79b859deb.tar.xz |
gma500: Fix missing memory check
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/staging/gma500/intel_bios.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/staging/gma500/intel_bios.c b/drivers/staging/gma500/intel_bios.c index 1c4714d..096757f 100644 --- a/drivers/staging/gma500/intel_bios.c +++ b/drivers/staging/gma500/intel_bios.c @@ -139,14 +139,18 @@ static void parse_lfp_panel_data(struct drm_psb_private *dev_priv, if (!lvds_lfp_data) return; - dev_priv->lvds_vbt = 1; entry = &lvds_lfp_data->data[lvds_options->panel_type]; dvo_timing = &entry->dvo_timing; panel_fixed_mode = kzalloc(sizeof(*panel_fixed_mode), GFP_KERNEL); + if (panel_fixed_mode == NULL) { + dev_err(dev_priv->dev->dev, "out of memory for fixed panel mode\n"); + return; + } + dev_priv->lvds_vbt = 1; fill_detail_timing_data(panel_fixed_mode, dvo_timing); if (panel_fixed_mode->htotal > 0 && panel_fixed_mode->vtotal > 0) { |