From patchwork Wed Sep 25 12:02:56 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 2941951 Return-Path: X-Original-To: patchwork-linux-fbdev@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id BA4A79F289 for ; Wed, 25 Sep 2013 12:03:05 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A59CA20574 for ; Wed, 25 Sep 2013 12:03:04 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7C20920573 for ; Wed, 25 Sep 2013 12:03:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755198Ab3IYMDC (ORCPT ); Wed, 25 Sep 2013 08:03:02 -0400 Received: from mail-pb0-f53.google.com ([209.85.160.53]:57204 "EHLO mail-pb0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754667Ab3IYMDC (ORCPT ); Wed, 25 Sep 2013 08:03:02 -0400 Received: by mail-pb0-f53.google.com with SMTP id up15so5952116pbc.12 for ; Wed, 25 Sep 2013 05:03:01 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=xxavtNJ8+Z4Xr2xVhcHQt6+4ndpMeC3w5xIitnC0jq0=; b=U3T9hU3a4FQvMkqhjc1Mr32Q8bbmCK6IxZreAKAIzFfE5JJBiNXikDprUVkSuKYZ4s bDANwMZ70jU75v1EY68WS/9pwhktv/tn+LtlK1Ot6wb7T5r8wS3KDr2xh4vvpBWTZ18S bqAdoDuV/CWYnf6TzqYrtq5pyjRAmkQLaybjUVFhh2JCU0IwjMI3PhtTRLlOm2tbD87u t3fUpiOvL0rm0XSYQdF+C3VA2NmxD0lR9Or8nTfId6fbzp2un83yPePS0hTvsxqGpKua ntdvaWQ/FZ0pv42w0rd1T8z0xzXIeTyAljP59oZOJ8gsq/ryZsCd9pcr5x5QCvbk2hFc YnYA== X-Gm-Message-State: ALoCoQnv8vMamSKNLgK+Ercdc6ZfLbAs47BEIMx1JO+l8N5snUKVR/20o74NVROyuR1+5IhRMz4d X-Received: by 10.68.90.129 with SMTP id bw1mr32687747pbb.111.1380110581172; Wed, 25 Sep 2013 05:03:01 -0700 (PDT) Received: from linaro.sisodomain.com ([115.113.119.130]) by mx.google.com with ESMTPSA id tz3sm47246890pbc.20.1969.12.31.16.00.00 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 25 Sep 2013 05:03:00 -0700 (PDT) From: Sachin Kamat To: linux-fbdev@vger.kernel.org Cc: plagnioj@jcrosoft.com, tomi.valkeinen@ti.com, adaplas@gmail.com, benh@kernel.crashing.org, sachin.kamat@linaro.org Subject: [PATCH 1/4] video: vfb: Remove incorrect check Date: Wed, 25 Sep 2013 17:32:56 +0530 Message-Id: <1380110579-3665-1-git-send-email-sachin.kamat@linaro.org> X-Mailer: git-send-email 1.7.9.5 Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org X-Spam-Status: No, score=-8.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 'yoffset' is unsigned and hence cannot be less than 0. Signed-off-by: Sachin Kamat --- 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 ||