Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp1318028yba; Tue, 2 Apr 2019 06:47:01 -0700 (PDT) X-Google-Smtp-Source: APXvYqwd/mxmIWhdZEP67oz3zZeJs7r1jnKTINnaFluzQsGI7X9d08W2BzIJnqpNKDt0J6jKr69A X-Received: by 2002:a63:cf0f:: with SMTP id j15mr67152986pgg.329.1554212821409; Tue, 02 Apr 2019 06:47:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554212821; cv=none; d=google.com; s=arc-20160816; b=NqqRSs5L7+0SiSo9PqaER6jwPxQTwR/RG3E9vEu0GMvsztcFbnxBenZkKvnBnHrWbl xJ00sPB0pK/qbmsFclyNOtjdAeuoUrTiLEbGaYD9HMCDmjlWb7R/PhKA1A7iYaDlql8I TFj6uIXX/rjcbR96rmPsCDX54zyPHBQN+nu6rIL+4P40JDWgNL9D4KMLkbmVC3zC7XcG +OZNCRrfK/cqGDacF+V9zR1RqVfJiOxLNrJOsx37G7mrzEiIt1DUbfonRNwlMlRXPqhK ZAmoiN/oqkIGE/Jo2pBfjt3xKLvX8GYd4ECrVV6wg2xYcmIZzF//NEnWknRQpit/BTdh WQKw== 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; bh=i7BChdt0f9H3R90cNmC+/7xhHAgTEVRKd48pJONV2lA=; b=Yjnf0mmVpxLL1Z/TkhMmFXsrqRll55bCT4PH22ND2FnqGfqCzBQ5lorFPjkZuOufKl XUymLOSerujIpH1W9hyaYkRN2tr9nyW/Mpd+QNtR+pFFu+4ZZl3WrnQRFqZMFjl/RHLr /Jv+S0v3Tcy26B4IHR+jidtx5se/mD7Hfj6H6ar/r+KYqOY7bymLFUb5nkDFCTB7qJKU Q2+Z/uPwHfS6SxCuQcJLK9HEPAhHQhSNY5feD8+XHCevSdkox20ChmS5DKNVhsVsT4Kz ZyCntw46uD6Ssn4e7ONmDFElMGsqPKZrbgwjAYfFG2p10zdN1wMl8XBPGgqG8vkOzSp8 s+wA== 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 a6si3037300pgt.34.2019.04.02.06.46.46; Tue, 02 Apr 2019 06:47:01 -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 S1731968AbfDBNpg (ORCPT + 99 others); Tue, 2 Apr 2019 09:45:36 -0400 Received: from shadbolt.e.decadent.org.uk ([88.96.1.126]:43298 "EHLO shadbolt.e.decadent.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731455AbfDBNkG (ORCPT ); Tue, 2 Apr 2019 09:40:06 -0400 Received: from [167.98.27.226] (helo=deadeye) by shadbolt.decadent.org.uk with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hBJe0-0002ny-B1; Tue, 02 Apr 2019 14:40:04 +0100 Received: from ben by deadeye with local (Exim 4.92) (envelope-from ) id 1hBJdx-0004wP-Di; Tue, 02 Apr 2019 14:40:01 +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, Denis Kirjanov , "Dan Carpenter" , "Dmitry Torokhov" Date: Tue, 02 Apr 2019 14:38:28 +0100 Message-ID: X-Mailer: LinuxStableQueue (scripts by bwh) X-Patchwork-Hint: ignore Subject: [PATCH 3.16 74/99] Input: nomadik-ske-keypad - fix a loop timeout test In-Reply-To: X-SA-Exim-Connect-IP: 167.98.27.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.65-rc1 review patch. If anyone has any objections, please let me know. ------------------ From: Dan Carpenter commit 4d8f727b83bcd6702c2d210330872c9122d2d360 upstream. The loop exits with "timeout" set to -1 not to 0. Fixes: 1158f0f16224 ("Input: add support for Nomadik SKE keypad controller") Signed-off-by: Dan Carpenter Signed-off-by: Dmitry Torokhov Signed-off-by: Ben Hutchings --- drivers/input/keyboard/nomadik-ske-keypad.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/input/keyboard/nomadik-ske-keypad.c +++ b/drivers/input/keyboard/nomadik-ske-keypad.c @@ -100,7 +100,7 @@ static int __init ske_keypad_chip_init(s while ((readl(keypad->reg_base + SKE_RIS) != 0x00000000) && timeout--) cpu_relax(); - if (!timeout) + if (timeout == -1) return -EINVAL; /*