From: Rob Clark Date: Fri, 25 Apr 2014 16:30:53 +0000 (-0400) Subject: drm/msm/mdp5: fix crash in error/unload paths X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=8a57e95057acdc37362f09ede3d7520f71de6f93;p=linux-beck.git drm/msm/mdp5: fix crash in error/unload paths Signed-off-by: Rob Clark --- diff --git a/drivers/gpu/drm/msm/mdp/mdp5/mdp5_plane.c b/drivers/gpu/drm/msm/mdp/mdp5/mdp5_plane.c index 47f7bbb9c15a..f3daec4412ad 100644 --- a/drivers/gpu/drm/msm/mdp/mdp5/mdp5_plane.c +++ b/drivers/gpu/drm/msm/mdp/mdp5/mdp5_plane.c @@ -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); - mdp5_plane_disable(plane); drm_plane_cleanup(plane); kfree(mdp5_plane);