From patchwork Thu Jun 4 12:28:43 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roel Kluin X-Patchwork-Id: 27858 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n54AYCD3032192 for ; Thu, 4 Jun 2009 10:34:12 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751080AbZFDKeI (ORCPT ); Thu, 4 Jun 2009 06:34:08 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753648AbZFDKeI (ORCPT ); Thu, 4 Jun 2009 06:34:08 -0400 Received: from mail-ew0-f210.google.com ([209.85.219.210]:60764 "EHLO mail-ew0-f210.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751080AbZFDKeH (ORCPT ); Thu, 4 Jun 2009 06:34:07 -0400 X-Greylist: delayed 332 seconds by postgrey-1.27 at vger.kernel.org; Thu, 04 Jun 2009 06:34:07 EDT Received: by ewy6 with SMTP id 6so968142ewy.37 for ; Thu, 04 Jun 2009 03:34:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:cc:subject:content-type :content-transfer-encoding; bh=opZEEi2ogl/xzBeSYSOQbOUa7CgL3cXzmCFOJnlYrWU=; b=F2KeibpP6JBVUp0Cl19fNnNyWaVbJ/INjPnhDbzCzHclnoLfmvNZvh2MhmiRwWczpj mRQ0LpmD1hzFQ9hlHyDTDhPJ8btt6b8lSwq4wnqz+PaX4us6KS9TsJcm7CZ8c2uAx5UT JOEVuSdbfQYj4MxlyvCbI+ou4xptlVJ6WdmBc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject :content-type:content-transfer-encoding; b=NzVmX5rXPg/AkXiC6p8xk3MRIWUQsm46S/HGStQlzZb0+FSWx2/kClZv1WKFZEkCDD Jtg+X13B0K9h9JFRPsDdnAZCneaVuNbeSa2jGBlt8XOOrYBrYrGRcL+yFgzDtwzCKcCc k7sGaTJpBhcvdZOhpeptvDiSMF2Y0xT2gh1IY= Received: by 10.216.51.202 with SMTP id b52mr700910wec.38.1244111313510; Thu, 04 Jun 2009 03:28:33 -0700 (PDT) Received: from ?192.168.1.2? (d133062.upc-d.chello.nl [213.46.133.62]) by mx.google.com with ESMTPS id m5sm20858428gve.18.2009.06.04.03.28.32 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 04 Jun 2009 03:28:33 -0700 (PDT) Message-ID: <4A27BDFB.403@gmail.com> Date: Thu, 04 Jun 2009 14:28:43 +0200 From: Roel Kluin User-Agent: Thunderbird 2.0.0.21 (X11/20090320) MIME-Version: 1.0 To: mchehab@infradead.org CC: linux-media@vger.kernel.org, Andrew Morton Subject: [PATCH] tvp514x: try_count off by one. Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org with `while (try_count-- > 0)' try_count reaches -1 after the loop. Signed-off-by: Roel Kluin --- -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/media/video/tvp514x.c b/drivers/media/video/tvp514x.c index 4262e60..3750f7f 100644 --- a/drivers/media/video/tvp514x.c +++ b/drivers/media/video/tvp514x.c @@ -692,7 +692,7 @@ static int ioctl_s_routing(struct v4l2_int_device *s, break; /* Input detected */ } - if ((current_std == STD_INVALID) || (try_count <= 0)) + if ((current_std == STD_INVALID) || (try_count < 0)) return -EINVAL; decoder->current_std = current_std;