提交 7d0ed304 编写于 作者: D Dan Carpenter 提交者: Sean Paul

drm: self_refresh: Fix a reversed condition in drm_self_refresh_helper_cleanup()

This test is flipped around so it either leads to a memory leak or a
NULL dereference.

Fixes: 1452c25b ("drm: Add helpers to kick off self refresh mode in drivers")
Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: NSean Paul <seanpaul@chromium.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20190619100141.GA28596@mwanda
上级 90b86fcc
......@@ -205,7 +205,7 @@ void drm_self_refresh_helper_cleanup(struct drm_crtc *crtc)
struct drm_self_refresh_data *sr_data = crtc->self_refresh_data;
/* Helper is already uninitialized */
if (sr_data)
if (!sr_data)
return;
crtc->self_refresh_data = NULL;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册