Skip to content

Commit

Permalink
gma500: Fix missing memory check
Browse files Browse the repository at this point in the history
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Alan Cox authored and Greg Kroah-Hartman committed Jul 5, 2011
1 parent 52b6ba0 commit 398c442
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion drivers/staging/gma500/intel_bios.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 398c442

Please sign in to comment.