Skip to content

Commit

Permalink
i915: signedness bug in check_overlay_src()
Browse files Browse the repository at this point in the history
"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>
  • Loading branch information
Dan Carpenter authored and Chris Wilson committed Oct 27, 2010
1 parent dd2b379 commit 8f28f54
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/gpu/drm/i915/intel_overlay.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down

0 comments on commit 8f28f54

Please sign in to comment.