Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp2279817imm; Thu, 7 Jun 2018 08:07:26 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJYzsZVGRPgtOkNg5VNN5m6YHlBreRGhnVDndU41weAUbkyTqgmG/rvZy2en9zL++w5kb0b X-Received: by 2002:a17:902:64cf:: with SMTP id y15-v6mr2489490pli.53.1528384045884; Thu, 07 Jun 2018 08:07:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528384045; cv=none; d=google.com; s=arc-20160816; b=iApmLWyYAPDXIypqvHWdirx3TFUVUNgiBqlN/3mFzIUm2gT9oN2U7zEmK0YNaLBXOl GCxHez+c7D8JD88l8kRieBU1BbgPYSCghF7nj9Ta4Uki4wO0e27u25C/Yncp9m68T9Gm QuG7KNJCRBqGdzCfCnZGGk2VkLuSEOIFpeitjgF+Xt7ELqsFsl6pObi/ScswLzyDxhRS g8L9zceLRDMMme+ZjYCm6ldGcRj9VEHlKUeYC/crz60k3EZCdqrRWlqV+9BqJ6ksrifa 41EOZk6nEMq4q3awJ3iJqHCH9npA+zMs99UHTHPKVF+rGV7m5rNIiAXM0c21jm+BvQ89 3dTg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:subject:message-id:date:cc:to :from:mime-version:content-transfer-encoding:content-disposition :arc-authentication-results; bh=lQ7gwfjEoFkaJcCfdFgxgc2jqJnbJJlobxaFUmxRG90=; b=Z29+xXP/1Khb8gAa5EboDTROaA2+wzkGFG0a5Tn1IcNSG3LnkT8HupkKJpEIfCq7cn NzSOltG9+KHcEbTe3yz8rxqj4D7LvMMpZ8wkKREY4nJzSClYLA8ULxpG27dnP6CipzxN 4S1v9K6ynOmNm54cFzXrQVoDz62oJnCqsytzWmF7PnAFUp3W+CVK8goaRqLvPifrUoxZ uY7UeuwEMtRNtVX5q/tyNc7LDeLX0W3k10dgw20Oaszpn+JpGopK7uRqosCCVmX8Xk8y m2mxJsRjyFUXNYa8Ic3vFUKQzCDyKKD2k2ZPshuNCy8PJEz6XZLashFq09VqCtHG+GCe yblA== 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 a38-v6si13793597pla.541.2018.06.07.08.07.09; Thu, 07 Jun 2018 08:07:25 -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 S965110AbeFGPE7 (ORCPT + 99 others); Thu, 7 Jun 2018 11:04:59 -0400 Received: from shadbolt.e.decadent.org.uk ([88.96.1.126]:41576 "EHLO shadbolt.e.decadent.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934962AbeFGPEK (ORCPT ); Thu, 7 Jun 2018 11:04:10 -0400 Received: from [148.252.241.226] (helo=deadeye) by shadbolt.decadent.org.uk with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1fQvbu-0005Zp-5O; Thu, 07 Jun 2018 15:09:54 +0100 Received: from ben by deadeye with local (Exim 4.91) (envelope-from ) id 1fQvb0-0002nX-GV; Thu, 07 Jun 2018 15:08:58 +0100 Content-Type: text/plain; charset="UTF-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit MIME-Version: 1.0 From: Ben Hutchings To: linux-kernel@vger.kernel.org, stable@vger.kernel.org CC: akpm@linux-foundation.org, "Mark Brown" , "Dan Carpenter" Date: Thu, 07 Jun 2018 15:05:21 +0100 Message-ID: X-Mailer: LinuxStableQueue (scripts by bwh) Subject: [PATCH 3.16 079/410] ASoC: nuc900: Fix a loop timeout test In-Reply-To: X-SA-Exim-Connect-IP: 148.252.241.226 X-SA-Exim-Mail-From: ben@decadent.org.uk X-SA-Exim-Scanned: No (on shadbolt.decadent.org.uk); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 3.16.57-rc1 review patch. If anyone has any objections, please let me know. ------------------ From: Dan Carpenter commit 65a12b3aafed5fc59f4ce41b22b752b1729e6701 upstream. 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: Ben Hutchings --- 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)