Received: by 10.213.65.68 with SMTP id h4csp14906imn; Mon, 19 Mar 2018 17:57:53 -0700 (PDT) X-Google-Smtp-Source: AG47ELsL+fCteuzhQ9PmovJyUmh13ZnE3vizIjDt+M6i2mavbSSayJWlQozeQDvDt93mPrhF3hZA X-Received: by 10.167.129.129 with SMTP id g1mr11894450pfi.224.1521507473726; Mon, 19 Mar 2018 17:57:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521507473; cv=none; d=google.com; s=arc-20160816; b=k+9U6wyi8phSmMS8Lixu6e7zYYbGrxGwLNO3Ks7CJTCqyuLZFW6blqrfYt5BBth0rE +rf/JrxNDTOHcRhEyqsa+2G0QIcRjXkVYTu8u0a0cnJ8w1ExueW+Kz4nu+vMMxmIhKCd g3dX+1KcJL1/LnwcmDx2RZE+4LfyJpZsKs/A/wBSElV/yum6QFnrKtRKcFQUO44hv09t HMUSuzdSOISu09ErJNmdnQULUkVu7BSMUzYnMha++fA4dubbmmAiVDl9WShlYmfdfpZA qB3MzQidQ2mh8gg0YqHU3qBcVQjTT/8rSf4Sq/19Vvc6MdYoEIZ1uKoHrfhF1PZanZxm NC6A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=033gL/Se6vahhKPh8rGGTWIfErvOTuAqHVFlBrhA3zI=; b=mNWfHSjnvLBM4lzpF9BJeF103euiIKXiIDS+VnapVD4I8ouIGGxPPpbfLL1aJfbgNv F2TNECoi3/B2aARpmjP50n9tYGAu780sxokGAfxwHg6HF/dUEKSJ+lh87bMdMGs8s5SC hzhc/5v0erYrzZBXWpi4TJEQrZbcWDBlM/uTuyT1ganJ54mZK9dnfMrI2vaRoaAFSsec NE/7H8ZgeJ+VGQZ/TGT0oBejZ/cCX6O3GrYZxSe6cDiH/WhIEVxkqFPPFdtCnr+b7ffQ klEeIRo+rpccQchCph57epiAbmn+wCo951UjdGr51ebfUsN5nuuCUtoKeAEih8XQqMqf 7UeQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j8-v6si443144plk.426.2018.03.19.17.57.39; Mon, 19 Mar 2018 17:57:53 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S969990AbeCSS1T (ORCPT + 99 others); Mon, 19 Mar 2018 14:27:19 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:51110 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1031567AbeCSS1J (ORCPT ); Mon, 19 Mar 2018 14:27:09 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 36D50126C; Mon, 19 Mar 2018 18:27:08 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Dan Carpenter , Mark Brown , Sasha Levin Subject: [PATCH 4.9 205/241] ASoC: nuc900: Fix a loop timeout test Date: Mon, 19 Mar 2018 19:07:50 +0100 Message-Id: <20180319180759.667723908@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180319180751.172155436@linuxfoundation.org> References: <20180319180751.172155436@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.9-stable review patch. If anyone has any objections, please let me know. ------------------ From: Dan Carpenter [ Upstream commit 65a12b3aafed5fc59f4ce41b22b752b1729e6701 ] We should be finishing the loop with timeout set to zero but because this is a post-op we finish with timeout == -1. Fixes: 1082e2703a2d ("ASoC: NUC900/audio: add nuc900 audio driver support") Signed-off-by: Dan Carpenter Signed-off-by: Mark Brown Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- sound/soc/nuc900/nuc900-ac97.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/sound/soc/nuc900/nuc900-ac97.c +++ b/sound/soc/nuc900/nuc900-ac97.c @@ -67,7 +67,7 @@ static unsigned short nuc900_ac97_read(s /* polling the AC_R_FINISH */ while (!(AUDIO_READ(nuc900_audio->mmio + ACTL_ACCON) & AC_R_FINISH) - && timeout--) + && --timeout) mdelay(1); if (!timeout) { @@ -121,7 +121,7 @@ static void nuc900_ac97_write(struct snd /* polling the AC_W_FINISH */ while ((AUDIO_READ(nuc900_audio->mmio + ACTL_ACCON) & AC_W_FINISH) - && timeout--) + && --timeout) mdelay(1); if (!timeout)