aboutsummaryrefslogtreecommitdiff
path: root/drivers/video/adf
diff options
context:
space:
mode:
authorGreg Hackmann <ghackmann@google.com>2013-11-20 12:10:35 -0800
committerColin Cross <ccross@android.com>2014-03-19 13:10:47 -0700
commit3d9357eabcada4fae4a5f1d64836283d61f3fa1d (patch)
tree70dc0f03d716d31c833340872f73014f64055d30 /drivers/video/adf
parentc26b8c4e4a9b86d9751782ee0d5f4373da736e3c (diff)
video: adf: validate dpms state passed to blank
Change-Id: I3a4228d50fc4a2553b3e92e5675a94cbc6e71b8a Signed-off-by: Greg Hackmann <ghackmann@google.com>
Diffstat (limited to 'drivers/video/adf')
-rw-r--r--drivers/video/adf/adf_client.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/video/adf/adf_client.c b/drivers/video/adf/adf_client.c
index e4a79213507..bba873d34bb 100644
--- a/drivers/video/adf/adf_client.c
+++ b/drivers/video/adf/adf_client.c
@@ -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);