From patchwork Thu Feb 25 07:48:10 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Carpenter X-Patchwork-Id: 8420191 Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 0E29F9F2F0 for ; Thu, 25 Feb 2016 07:48:48 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 5BC5D20265 for ; Thu, 25 Feb 2016 07:48:47 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id D7B0A20260 for ; Thu, 25 Feb 2016 07:48:45 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 450A12617B8; Thu, 25 Feb 2016 08:48:44 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id A156826155E; Thu, 25 Feb 2016 08:48:35 +0100 (CET) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id C1A3F261585; Thu, 25 Feb 2016 08:48:34 +0100 (CET) Received: from userp1040.oracle.com (userp1040.oracle.com [156.151.31.81]) by alsa0.perex.cz (Postfix) with ESMTP id 31070261504 for ; Thu, 25 Feb 2016 08:48:26 +0100 (CET) Received: from userv0021.oracle.com (userv0021.oracle.com [156.151.31.71]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id u1P7mMgT007678 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 25 Feb 2016 07:48:22 GMT Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by userv0021.oracle.com (8.13.8/8.13.8) with ESMTP id u1P7mLgo008488 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Thu, 25 Feb 2016 07:48:22 GMT Received: from abhmp0019.oracle.com (abhmp0019.oracle.com [141.146.116.25]) by aserv0122.oracle.com (8.13.8/8.13.8) with ESMTP id u1P7mHeT016991; Thu, 25 Feb 2016 07:48:18 GMT Received: from mwanda (/154.0.139.178) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Wed, 24 Feb 2016 23:48:17 -0800 Date: Thu, 25 Feb 2016 10:48:10 +0300 From: Dan Carpenter To: Liam Girdwood , anish kumar Message-ID: <20160225074810.GB7333@mwanda> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.24 (2015-08-30) X-Source-IP: userv0021.oracle.com [156.151.31.71] Cc: alsa-devel@alsa-project.org, Axel Lin , kernel-janitors@vger.kernel.org, Takashi Iwai , Mark Brown Subject: [alsa-devel] [patch 1/2] ASoC: max9867: signedness bug in max9867_dai_hw_params() X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP "value" needs to be signed for the error handling to work. Fixes: 805d132dcbbd ('ASoC: Add max9867 codec driver') Signed-off-by: Dan Carpenter diff --git a/sound/soc/codecs/max9867.c b/sound/soc/codecs/max9867.c index ab7a94d..4fb6fc7 100755 --- a/sound/soc/codecs/max9867.c +++ b/sound/soc/codecs/max9867.c @@ -180,7 +180,8 @@ static int max9867_dai_hw_params(struct snd_pcm_substream *substream, { struct snd_soc_codec *codec = dai->codec; struct max9867_priv *max9867 = snd_soc_codec_get_drvdata(codec); - unsigned int ni_h, ni_l, value; + unsigned int ni_h, ni_l; + int value; value = get_ni_value(max9867->sysclk, params_rate(params)); if (value < 0)