Received: by 10.213.65.68 with SMTP id h4csp472128imn; Fri, 16 Mar 2018 08:47:52 -0700 (PDT) X-Google-Smtp-Source: AG47ELuPfmntTzSVy9+L61jesn8kt5l8tcs1YWNcjfzcubqJM/EfPB2ozbehQU9pD5FoYO3NyewP X-Received: by 10.101.72.199 with SMTP id o7mr1811594pgs.303.1521215272825; Fri, 16 Mar 2018 08:47:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521215272; cv=none; d=google.com; s=arc-20160816; b=K7wjPbHmFLw1WdbhX6pRFn7xuq3CACT8HHGv94Qgy/e3ROI/84YxjHJd6Fp46nprtW av1PO7FAcArrTgPGZHpNYKhEgOdX/0nzFn73YOvqVKZkiyuGunq/sNGk3g4Z3zVtaI/B 0TAmKSTRqAmkH3743tJ/VDNjALJks75EhBNLSpLLv/5+eC9KYB8G7UWgKvFYDKZtzDfI yAwdC7gWAevoIZOA6q/r8TccdyCQcSqZ8hBU9S1e7XwlyfCcEHSX3d9ryaIxgtOqMUzx HndmhOnfN/AOESIUIC7vn4dcmrV76/iBXfVOuKRjrApz0uD8UcAvMaZhKxyatL+Kyi9N Z0Cg== 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=t96k751oe5z4MVALufbJvVjVy5SEsI4fz55nVq8oZKs=; b=VIc+5LlnoEcEDsMuvARTap9epEwzh03cvad5ZUk7OrxeuIDlJiLrw1V41GutL7K0UG U3YBXymFtvFn+qfnZsH7sLrCZIaymtrAQdSUlrtllC/hVQ8rXmBg1jvf6frhcZIW/fBk xJ85EAFK+8//qyL/my+xLN0mdCTzE/8Pz1uz68L5RZ5ck5Y4DwzMaBzIp9mcLveut4uX 3pK3PLgjAJJJ2n+Ou23DNGj+Ki1lRJPv7vh1okLsQ5osJ6GbX+VK/tS2wx2iO5xmD8F+ 9TdwvgfeivQI5zRB38p1mM2IH/rfO4Mfp2LsdbgdDk2aVX4ZzufOdQaD+ya2v2/YAWio WxoQ== 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 u27si5676841pfk.241.2018.03.16.08.47.38; Fri, 16 Mar 2018 08:47:52 -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 S934261AbeCPPpO (ORCPT + 99 others); Fri, 16 Mar 2018 11:45:14 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:46244 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932967AbeCPPpK (ORCPT ); Fri, 16 Mar 2018 11:45:10 -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 00DA1F1A; Fri, 16 Mar 2018 15:45:09 +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.15 119/128] ASoC: nuc900: Fix a loop timeout test Date: Fri, 16 Mar 2018 16:24:20 +0100 Message-Id: <20180316152342.382640213@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180316152336.199007505@linuxfoundation.org> References: <20180316152336.199007505@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.15-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)