提交 f65c18c0 编写于 作者: L Laurent Pinchart 提交者: Rob Clark

drm/msm/atomic: Clean up planes in the error paths of .atomic_commit()

When the .atomic_commit() handler fails, clean up planes previoulsy
prepared by drm_atomic_helper_prepare_planes() with a call to
drm_atomic_helper_cleanup_planes().
Signed-off-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: NRob Clark <robdclark@gmail.com>
上级 1efb92a3
......@@ -213,8 +213,10 @@ int msm_atomic_commit(struct drm_device *dev,
return ret;
c = commit_init(state);
if (!c)
return -ENOMEM;
if (!c) {
ret = -ENOMEM;
goto error;
}
/*
* Figure out what crtcs we have:
......@@ -247,7 +249,7 @@ int msm_atomic_commit(struct drm_device *dev,
ret = start_atomic(dev->dev_private, c->crtc_mask);
if (ret) {
kfree(c);
return ret;
goto error;
}
/*
......@@ -291,4 +293,8 @@ int msm_atomic_commit(struct drm_device *dev,
complete_commit(c);
return 0;
error:
drm_atomic_helper_cleanup_planes(dev, state);
return ret;
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册