diff options
author | Alan Cox <alan@linux.intel.com> | 2012-05-14 12:04:00 +0100 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2012-05-17 11:05:30 +0100 |
commit | 4ab2c7f15423f313187b310a48ee0ac631c414f1 (patch) | |
tree | 41844429f95ed794a8b513beee8cf3a7d442d656 /drivers/gpu/drm/gma500/intel_bios.c | |
parent | 6607e024014e4920e8d3e43bcfeec0436d43d980 (diff) | |
download | lwn-4ab2c7f15423f313187b310a48ee0ac631c414f1.tar.gz lwn-4ab2c7f15423f313187b310a48ee0ac631c414f1.zip |
gma500: unload fixes
Debugging the lid problem tested various error paths which were found
wanting so start fixing them up.
There is a ton of improvement work could be done here so that every bit
of functionality agrees if its _fini, _uninit, etc, and they agree who
is responsible for deciding if the clean up is needed.
That can come later.
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/gma500/intel_bios.c')
-rw-r--r-- | drivers/gpu/drm/gma500/intel_bios.c | 24 |
1 files changed, 3 insertions, 21 deletions
diff --git a/drivers/gpu/drm/gma500/intel_bios.c b/drivers/gpu/drm/gma500/intel_bios.c index 479e4497d26c..973d7f6d66b7 100644 --- a/drivers/gpu/drm/gma500/intel_bios.c +++ b/drivers/gpu/drm/gma500/intel_bios.c @@ -490,26 +490,8 @@ bool psb_intel_init_bios(struct drm_device *dev) void psb_intel_destroy_bios(struct drm_device *dev) { struct drm_psb_private *dev_priv = dev->dev_private; - struct drm_display_mode *sdvo_lvds_vbt_mode = - dev_priv->sdvo_lvds_vbt_mode; - struct drm_display_mode *lfp_lvds_vbt_mode = - dev_priv->lfp_lvds_vbt_mode; - struct bdb_lvds_backlight *lvds_bl = - dev_priv->lvds_bl; - - /*free sdvo panel mode*/ - if (sdvo_lvds_vbt_mode) { - dev_priv->sdvo_lvds_vbt_mode = NULL; - kfree(sdvo_lvds_vbt_mode); - } - - if (lfp_lvds_vbt_mode) { - dev_priv->lfp_lvds_vbt_mode = NULL; - kfree(lfp_lvds_vbt_mode); - } - if (lvds_bl) { - dev_priv->lvds_bl = NULL; - kfree(lvds_bl); - } + kfree(dev_priv->sdvo_lvds_vbt_mode); + kfree(dev_priv->lfp_lvds_vbt_mode); + kfree(dev_priv->lvds_bl); } |