summaryrefslogtreecommitdiff
path: root/drivers/gpu
diff options
context:
space:
mode:
authorDan Carpenter <error27@gmail.com>2010-10-28 01:17:25 +0400
committerChris Wilson <chris@chris-wilson.co.uk>2010-10-28 01:57:59 +0400
commit8f28f54aad8bcf52a47afb6447fac34f96597b6f (patch)
tree4d6f3b91909ec80b5015ac73b293279d3e5dfce1 /drivers/gpu
parentdd2b379f071424f36f9f90ff83cb4ad058c7b6ed (diff)
downloadlinux-8f28f54aad8bcf52a47afb6447fac34f96597b6f.tar.xz
i915: signedness bug in check_overlay_src()
"depth" should be signed in case packed_depth_bytes() returns -EINVAL. This probably doesn't make a difference at runtime. In the original code we would return -EINVAL later if (rec->offset_Y % 4294967274) is non-zero. Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/i915/intel_overlay.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/intel_overlay.c b/drivers/gpu/drm/i915/intel_overlay.c
index afb96d25219a..02ff0a481f47 100644
--- a/drivers/gpu/drm/i915/intel_overlay.c
+++ b/drivers/gpu/drm/i915/intel_overlay.c
@@ -946,7 +946,9 @@ static int check_overlay_src(struct drm_device *dev,
{
int uv_hscale = uv_hsubsampling(rec->flags);
int uv_vscale = uv_vsubsampling(rec->flags);
- u32 stride_mask, depth, tmp;
+ u32 stride_mask;
+ int depth;
+ u32 tmp;
/* check src dimensions */
if (IS_845G(dev) || IS_I830(dev)) {