diff options
author | Dave Airlie <airlied@redhat.com> | 2013-04-16 13:36:00 +1000 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2013-04-16 13:36:00 +1000 |
commit | 62c8ba7c58e4163f975c5f8b5a3dd5f306a2deda (patch) | |
tree | 0172a68cb13daa74b4c7003946c44d19076b54ee /drivers/gpu/drm/qxl/qxl_ioctl.c | |
parent | 6d01f1f54c01877baad11389291c1aeab9c11e0f (diff) | |
download | talos-obmc-linux-62c8ba7c58e4163f975c5f8b5a3dd5f306a2deda.tar.gz talos-obmc-linux-62c8ba7c58e4163f975c5f8b5a3dd5f306a2deda.zip |
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.c | 2 |
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 cec617222585..04b64f9cbfdb 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)) |