diff mbox

[2/5] drivers/gpu/drm/via/via_video.c: fix off by one issue

Message ID 201004272111.o3RLB3rc019955@imap1.linux-foundation.org (mailing list archive)
State New, archived
Headers show

Commit Message

Andrew Morton April 27, 2010, 9:11 p.m. UTC
None
diff mbox

Patch

diff -puN drivers/gpu/drm/via/via_video.c~drivers-gpu-drm-via-via_videoc-fix-off-by-one-issue drivers/gpu/drm/via/via_video.c
--- a/drivers/gpu/drm/via/via_video.c~drivers-gpu-drm-via-via_videoc-fix-off-by-one-issue
+++ a/drivers/gpu/drm/via/via_video.c
@@ -75,7 +75,7 @@  int via_decoder_futex(struct drm_device 
 
 	DRM_DEBUG("\n");
 
-	if (fx->lock > VIA_NR_XVMC_LOCKS)
+	if (fx->lock >= VIA_NR_XVMC_LOCKS)
 		return -EFAULT;
 
 	lock = (volatile int *)XVMCLOCKPTR(sAPriv, fx->lock);