From patchwork Thu Feb 7 16:13:13 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Michael_B=C3=BCsch?= X-Patchwork-Id: 2112141 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 9D814E00C6 for ; Thu, 7 Feb 2013 17:06:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759138Ab3BGRGo (ORCPT ); Thu, 7 Feb 2013 12:06:44 -0500 Received: from bues.ch ([80.190.117.144]:33774 "EHLO bues.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758939Ab3BGRFn (ORCPT ); Thu, 7 Feb 2013 12:05:43 -0500 Received: by bues.ch with esmtpsa (Exim 4.72) (envelope-from ) id 1U3UFA-0006Uj-Lh; Thu, 07 Feb 2013 17:22:37 +0100 Date: Thu, 7 Feb 2013 17:13:13 +0100 From: Michael =?UTF-8?B?QsO8c2No?= To: Mauro Carvalho Chehab Cc: linux-media Subject: [PATCH 1/4] fc0011: fp/fa value overflow fix Message-ID: <20130207171313.272e9078@milhouse> X-Mailer: Claws Mail 3.8.1 (GTK+ 2.24.10; x86_64-pc-linux-gnu) Mime-Version: 1.0 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Assign the maximum instead of masking with the maximum on value overflow. Signed-off-by: Michael Buesch Index: linux/drivers/media/tuners/fc0011.c =================================================================== --- linux.orig/drivers/media/tuners/fc0011.c 2012-10-22 16:11:27.634183359 +0200 +++ linux/drivers/media/tuners/fc0011.c 2012-10-22 16:13:29.140465225 +0200 @@ -247,8 +247,8 @@ fa += 8; } if (fp > 0x1F) { - fp &= 0x1F; - fa &= 0xF; + fp = 0x1F; + fa = 0xF; } if (fa >= fp) { dev_warn(&priv->i2c->dev,