drm: debugfs: No write dump buffer when crtc is not active

No framebuffer to dump when crtc is not active.

Change-Id: If05c629644653121f3fd97229eb845ffa30bf941
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
This commit is contained in:
Andy Yan
2020-11-11 21:03:14 +08:00
committed by Tao Huang
parent 02deab7718
commit 75a451f7d9

View File

@@ -227,6 +227,8 @@ static ssize_t vop_dump_write(struct file *file, const char __user *ubuf,
struct vop_dump_list *pos, *n;
int i = 0;
if (!crtc->vop_dump_list_init_flag)
return -EPERM;
if (len > sizeof(buf) - 1)
return -EINVAL;
if (copy_from_user(buf, ubuf, len))