drm/msm/mdp5: fix crash in error/unload paths

Signed-off-by: Rob Clark <robdclark@gmail.com>
This commit is contained in:
Rob Clark 2014-04-25 12:30:53 -04:00
parent 182407a6ed
commit 8a57e95057
1 changed files with 4 additions and 1 deletions

View File

@ -85,8 +85,11 @@ static int mdp5_plane_disable(struct drm_plane *plane)
static void mdp5_plane_destroy(struct drm_plane *plane)
{
struct mdp5_plane *mdp5_plane = to_mdp5_plane(plane);
struct msm_drm_private *priv = plane->dev->dev_private;
if (priv->kms)
mdp5_plane_disable(plane);
drm_plane_cleanup(plane);
kfree(mdp5_plane);