[PATCH 1/4] video: vfb: Remove incorrect check

Subsystems: framebuffer layer, the rest

STALE4695d

2 messages, 2 authors, 2013-09-26 · open the first message on its own page

[PATCH 1/4] video: vfb: Remove incorrect check

From: Sachin Kamat <hidden>
Date: 2013-09-25 12:14:56

'yoffset' is unsigned and hence cannot be less than 0.

Signed-off-by: Sachin Kamat <redacted>
---
 drivers/video/vfb.c |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/video/vfb.c b/drivers/video/vfb.c
index ee5985e..ea2b523 100644
--- a/drivers/video/vfb.c
+++ b/drivers/video/vfb.c
@@ -390,9 +390,8 @@ static int vfb_pan_display(struct fb_var_screeninfo *var,
 			   struct fb_info *info)
 {
 	if (var->vmode & FB_VMODE_YWRAP) {
-		if (var->yoffset < 0
-		    || var->yoffset >= info->var.yres_virtual
-		    || var->xoffset)
+		if (var->yoffset >= info->var.yres_virtual ||
+		    var->xoffset)
 			return -EINVAL;
 	} else {
 		if (var->xoffset + info->var.xres > info->var.xres_virtual ||
-- 
1.7.9.5

Re: [PATCH 1/4] video: vfb: Remove incorrect check

From: Tomi Valkeinen <hidden>
Date: 2013-09-26 09:10:43

On 25/09/13 15:02, Sachin Kamat wrote:
quoted hunk
'yoffset' is unsigned and hence cannot be less than 0.

Signed-off-by: Sachin Kamat <redacted>
---
 drivers/video/vfb.c |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/video/vfb.c b/drivers/video/vfb.c
index ee5985e..ea2b523 100644
--- a/drivers/video/vfb.c
+++ b/drivers/video/vfb.c
@@ -390,9 +390,8 @@ static int vfb_pan_display(struct fb_var_screeninfo *var,
 			   struct fb_info *info)
 {
 	if (var->vmode & FB_VMODE_YWRAP) {
-		if (var->yoffset < 0
-		    || var->yoffset >= info->var.yres_virtual
-		    || var->xoffset)
+		if (var->yoffset >= info->var.yres_virtual ||
+		    var->xoffset)
 			return -EINVAL;
 	} else {
 		if (var->xoffset + info->var.xres > info->var.xres_virtual ||
Thanks, queueng the series for 3.13.

 Tomi

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help