aboutsummaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/qxl/qxl_ioctl.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2013-04-16 13:36:00 +1000
committerDave Airlie <airlied@redhat.com>2013-04-16 13:36:00 +1000
commit62c8ba7c58e4163f975c5f8b5a3dd5f306a2deda (patch)
tree0172a68cb13daa74b4c7003946c44d19076b54ee /drivers/gpu/drm/qxl/qxl_ioctl.c
parent6d01f1f54c01877baad11389291c1aeab9c11e0f (diff)
drm/qxl: fix smatch warnings
drivers/gpu/drm/qxl/qxl_display.c:99 qxl_alloc_client_monitors_config() error: dereferencing freed memory 'qdev->client_monitors_config' drivers/gpu/drm/qxl/qxl_object.c:66 qxl_ttm_placement_from_domain() warn: bitwise AND condition is false here drivers/gpu/drm/qxl/qxl_ioctl.c:353 qxl_clientcap_ioctl() warn: buffer overflow 'qdev->rom->client_capabilities' 58 <= 58 Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/qxl/qxl_ioctl.c')
-rw-r--r--drivers/gpu/drm/qxl/qxl_ioctl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/qxl/qxl_ioctl.c b/drivers/gpu/drm/qxl/qxl_ioctl.c
index cec61722258..04b64f9cbfd 100644
--- a/drivers/gpu/drm/qxl/qxl_ioctl.c
+++ b/drivers/gpu/drm/qxl/qxl_ioctl.c
@@ -347,7 +347,7 @@ static int qxl_clientcap_ioctl(struct drm_device *dev, void *data,
if (qdev->pdev->revision < 4)
return -ENOSYS;
- if (byte > 58)
+ if (byte >= 58)
return -ENOSYS;
if (qdev->rom->client_capabilities[byte] & (1 << idx))