Received: by 10.213.65.68 with SMTP id h4csp468385imn; Fri, 16 Mar 2018 08:40:15 -0700 (PDT) X-Google-Smtp-Source: AG47ELsMVje8pOmuV8KT6bR3vxrHbRxvDlYm0Xsi2yb0IJbyjRoQkPWUk5qgl5HBrGpnWDo1i61Q X-Received: by 10.99.106.202 with SMTP id f193mr1848901pgc.334.1521214815860; Fri, 16 Mar 2018 08:40:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521214815; cv=none; d=google.com; s=arc-20160816; b=BT41RLh0A8MhVeOf+Q3ex+k5Ed4HgoAMKVd4r8LwiTgDVGpDJEeSF7zzFq8G0+9cuE hLksc8JdsmzsTBggtXyUKYgDosHyZQBOgTLWs2b4U6bulQ829w+4aBkeIuwrCjtsbcor 3j5+621IIETpYkNDQAjShmCBgoM2IGwbbQwbSyEejVlIQY0IgoIPNaOAGjc++N9zxz0F y3zqcDforEpgKQwGktH+iBeK2iHsXuVXzc9niC0R+5hwM0v4tfPQoUsjg+yoMCEnoIah g+vmByKbE7sn3FPbFswoeeI/PmgxkbkiOSJt9Y6eMhFwusOLUuq/EggmSocDj5pAXNWu PCog== 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=dOBUzLU2BXHtFQBWNDfdt5lF8Jm9UDwYykxChu9TTtA=; b=c+Y+l5BAO7IHm/4G/Kx4R/k/++EyqFhhY3HJtmc1AxThcfimXlegyuN0dSowMVFM/6 MhVnE9tm1gf2S+5u1uX9p4cMy7/J5yEf4NK5gVnzAxWReciBUZObMBrCUD6QrwJ+NEHL Z6uJLSyOBawnRWvwiuDtDBkCgFzDDpCYXoq+Eu5cHihX6CVnXDgKHmgmY7YW8REHtm0f Lr42j/FSgEEGgpQR1+SEnN4bylTiLZ8rQIXlKlUBZhxnf47w3Vpbcnlksv+O7ajx7R9X D/Q7ZspVjO2Nux++zpoKpcLY3MwVhZu1RqOMjOXbprESXjo2AJMk0B4kQxpKjWH1ckRa 92MQ== 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 e23si5624151pfn.228.2018.03.16.08.40.01; Fri, 16 Mar 2018 08:40:15 -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 S1754565AbeCPPic (ORCPT + 99 others); Fri, 16 Mar 2018 11:38:32 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:42910 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754501AbeCPPi3 (ORCPT ); Fri, 16 Mar 2018 11:38:29 -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 CED8C49F; Fri, 16 Mar 2018 15:38:28 +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.14 100/109] ASoC: nuc900: Fix a loop timeout test Date: Fri, 16 Mar 2018 16:24:09 +0100 Message-Id: <20180316152335.306771391@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180316152329.844663293@linuxfoundation.org> References: <20180316152329.844663293@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.14-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)