Received: by 10.213.65.68 with SMTP id h4csp1787878imn; Mon, 19 Mar 2018 13:16:21 -0700 (PDT) X-Google-Smtp-Source: AG47ELuqR4Qh95EPHK4HafNGCkVcJaKi7BZyOYJwg/0r7dKu5tfieOvcN+ykKA/+aoKFzAha2/id X-Received: by 10.98.63.75 with SMTP id m72mr6910225pfa.167.1521490580957; Mon, 19 Mar 2018 13:16:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521490580; cv=none; d=google.com; s=arc-20160816; b=BA7XaOLM8P34pwmHqUJiwcxpcy1JhYbidWs5c2pAwkdbEfxxLfcdiMsOtfQ0IDVKDS N0c6Sxuf3I/KHmVkysQr6t7sb+tLk6A3X/uk7RIJXMHuv2+Owbe93YClNeT8lOglo3dR UolWK9Hl0TI1JKaBsxBMCKvPjJz2BvicK0URy8uE9eiwOKNxEj46hotEQziyfEzZdEsN QyeM/h2OxkJGAGQf4wVM5Om3mtVnNg8Dktf5+esBiBuGyA3sRfZLfxDrRTJdDdb8izK4 RIUxflX1zrWvGcf8behfPm2t1lPplvASYi+uEBvTnoGvnItpAQR3ddcYeplFl9WbW90H wNEg== 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=rbc6sIjCFau6Mm+1jr5gCQOdqo/i3DTNgFL6nIWXd94=; b=NFaYkkm3nbN5MRLb2Olg1QYfp6PaTso8lAetA/3aIHAvV9RMbXzgbHDLNG2aXuktPR XTGC2/HKvHAJyjTWA2rLoqrDWIQUzeitJmm2WLStlwcUUIhJI3lItWQUCv8eG+E0QTjI j6w+83sEnAGgdqvYgBd1ayKNeZfnuNfePG1E+r24hieP9az7movbcfyvSq6XTMWK8wwj q5byjkqq6YknC6eK31qRXcyGjvSkd7XLwjT69OpIA4ZfXPqo7bNJqSdmjrN50YZ4dOQI fK27EPUKiagb4S2ThIIBnB+gW0MDdhE+JXpcNWLi4IKmV0Bm/bX4tmur7ZvmmWvLqKaH WH6w== 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 n9-v6si16883plp.245.2018.03.19.13.16.05; Mon, 19 Mar 2018 13:16:20 -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 S971199AbeCSUNO (ORCPT + 99 others); Mon, 19 Mar 2018 16:13:14 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:45178 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S969068AbeCSSQd (ORCPT ); Mon, 19 Mar 2018 14:16:33 -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 EFE741165; Mon, 19 Mar 2018 18:16:32 +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.4 106/134] ASoC: nuc900: Fix a loop timeout test Date: Mon, 19 Mar 2018 19:06:29 +0100 Message-Id: <20180319171904.555299725@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180319171849.024066323@linuxfoundation.org> References: <20180319171849.024066323@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.4-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)