mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-08 03:40:35 +09:00
video: adf: validate dpms state passed to blank
Change-Id: I3a4228d50fc4a2553b3e92e5675a94cbc6e71b8a Signed-off-by: Greg Hackmann <ghackmann@google.com>
This commit is contained in:
@@ -49,6 +49,9 @@ int adf_interface_blank(struct adf_interface *intf, u8 state)
|
||||
if (!intf->ops || !intf->ops->blank)
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
if (state > DRM_MODE_DPMS_OFF)
|
||||
return -EINVAL;
|
||||
|
||||
mutex_lock(&dev->client_lock);
|
||||
if (state != DRM_MODE_DPMS_ON)
|
||||
flush_kthread_worker(&dev->post_worker);
|
||||
|
||||
Reference in New Issue
Block a user