From patchwork Sun Mar 6 13:40:11 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Carpenter X-Patchwork-Id: 613461 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p26DebCt011740 for ; Sun, 6 Mar 2011 13:40:37 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753088Ab1CFNkc (ORCPT ); Sun, 6 Mar 2011 08:40:32 -0500 Received: from mail-iy0-f174.google.com ([209.85.210.174]:64624 "EHLO mail-iy0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752559Ab1CFNka (ORCPT ); Sun, 6 Mar 2011 08:40:30 -0500 Received: by iyb26 with SMTP id 26so3210138iyb.19 for ; Sun, 06 Mar 2011 05:40:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:date:from:to:cc:subject:message-id:mime-version :content-type:content-disposition:user-agent; bh=FQcF08QM1ety7rYQXSlj2G+KVwZ+MT/9fOkctWB1sw8=; b=T59nlJE3HbFgvS6w2FTKgfv8QVXGc0E9kwychpGG4bKm4H2q/tTuBPDRDzGcSpMEZY FOZky6FfYjaaddpLeSCNilOMEYFz5FL/wmshIyPzFjFL1RqQa32SHwTOrQd9eM+e2AqE JxpYh4Gq2OLxXPbihMAzmwnpsS0C84E6v2kow= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:mime-version:content-type :content-disposition:user-agent; b=EIJc3yjjaVoIunQp/XNeF1fMHKegL3k7yWK9xGJutMPil+iNhuMuqhMBWuxuyd3y/V HYa/chEiwp1xvo9aj49BHh7qc62SGV5GYd5DHBpHVNFZOHgBVcV3DXTk3NBlt8cazkMZ XjdZRkmp8AkFIYBHNRKKeZgigD34xsSQMmCBg= Received: by 10.42.168.8 with SMTP id u8mr3388043icy.284.1299418829980; Sun, 06 Mar 2011 05:40:29 -0800 (PST) Received: from bicker ([212.49.88.34]) by mx.google.com with ESMTPS id z4sm1741997ibg.1.2011.03.06.05.40.24 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 06 Mar 2011 05:40:29 -0800 (PST) Date: Sun, 6 Mar 2011 16:40:11 +0300 From: Dan Carpenter To: Mauro Carvalho Chehab Cc: "Igor M. Liplianin" , linux-media@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: [patch 1/2] [media] stv0367: signedness bug in stv0367_get_tuner_freq() Message-ID: <20110306134011.GO3416@bicker> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-06-14) Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Sun, 06 Mar 2011 13:40:37 +0000 (UTC) diff --git a/drivers/media/dvb/frontends/stv0367.c b/drivers/media/dvb/frontends/stv0367.c index eecdf23..7117ce9 100644 --- a/drivers/media/dvb/frontends/stv0367.c +++ b/drivers/media/dvb/frontends/stv0367.c @@ -913,7 +913,7 @@ static u32 stv0367_get_tuner_freq(struct dvb_frontend *fe) struct dvb_frontend_ops *frontend_ops = NULL; struct dvb_tuner_ops *tuner_ops = NULL; u32 freq = 0; - u32 err = 0; + int err = 0; dprintk("%s:\n", __func__); diff --git a/drivers/media/dvb/frontends/stv0367.c b/drivers/media/dvb/frontends/stv0367.c index ec9de40..1304618 100644 --- a/drivers/media/dvb/frontends/stv0367.c +++ b/drivers/media/dvb/frontends/stv0367.c @@ -1940,7 +1940,7 @@ static int stv0367ter_get_frontend(struct dvb_frontend *fe, int constell = 0,/* snr = 0,*/ Data = 0; param->frequency = stv0367_get_tuner_freq(fe); - if (param->frequency < 0) + if ((int)param->frequency < 0) param->frequency = c->frequency; constell = stv0367_readbits(state, F367TER_TPS_CONST);