Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp588591pxx; Wed, 28 Oct 2020 11:49:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwfi+COaWt2bJWVQn2r1MrswZHuVL1H/EnZg94V/rzGCA1A0M8zC4IdPM0U0nIws5jkCMps X-Received: by 2002:a50:9e0b:: with SMTP id z11mr269489ede.341.1603910951620; Wed, 28 Oct 2020 11:49:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603910951; cv=none; d=google.com; s=arc-20160816; b=TW/+NT0WZlg99S22dYc0rPyQ6sdik3vBOHs+zk2BcHY2XlXmcb1Gc6nfVeFdv5T8Fi t+XN5J4+YX3Rq8dIOeeDORxEYDbPAHAIPgV+TaLpTy6LtRv95YlDMsypneVkL8gPI6d0 cAtV2T7VES1w4QIZLKPK/x1W+ogudhyEPgqazuVsMZXcomN67q6barFHNDQU2On4iOpg Z4mupdXWjvnIK7Lk+YxvtcAjFV0cXSWZkz+ZOFbjuRX6GAtawNk6Bs1NrTSh/3MKzWKm lNy7c4gNc9/Elv2EPcqDo7klD9Jam/JxvmzvI1a5f3obg3zjD4rjSfw7Y2L1xEBTeRpk xVeg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=vBefmVj4uMKEHzzc5voG1HzAcLoIKcGb/Fd2Mq7anLU=; b=BU8+yp/7MQ9+GrntEIZ+3PwbW/CXVsILzagxfEeZ19rUK9liIm3iYWZHZ3ghVHdXuO CT0MkJw0OrnYdrH9kMHiEIMIzNS3doI3QZV/gEROSrMttpguXxKWTVB1RsiwhfeksC5x XU5kHHMyTVTgoWXMd51lYFLY5n32r1CGf5d581T/sf9fdDdOhc0WciIS3U+JzF3GKbXO O44UL4RcsrJoG2ZXCLERGmb1P+1oTRYj20cVibG03wYc43sNX59PZdfdoBp5YT79xgL1 V59f5qpb5IGopba58XhVPDro7DwlJ15lOq0sdN7wO26KuEO32PyW2YDQYxJiIbG9Cvag +uJw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=GKvQ+CAS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r21si3290edo.519.2020.10.28.11.48.48; Wed, 28 Oct 2020 11:49:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=GKvQ+CAS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1825835AbgJ0SOW (ORCPT + 99 others); Tue, 27 Oct 2020 14:14:22 -0400 Received: from mail.kernel.org ([198.145.29.99]:34820 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756464AbgJ0ON0 (ORCPT ); Tue, 27 Oct 2020 10:13:26 -0400 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 2523422265; Tue, 27 Oct 2020 14:13:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603808005; bh=Gm6quWG61QDKSQll4BJQfDy3dvG4rp4sAm9JUEJKn28=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=GKvQ+CASf3DnIWWSgys2qlITISRMgDjT8mSKuJYs+0qIVv2CQyONltzw/yKJtI/pg upSxMwFEv9Iakrf29eEuwOSh9vTfgqz7HUev8IDE4OT7IBrs/3cSjyZgPrY7xTg48G 9yJU6td6bBLrPOiouBiMvxqMEUEiyMVNJWWIORMw= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Krzysztof Kozlowski , Dmitry Torokhov , Sasha Levin Subject: [PATCH 4.14 121/191] Input: ep93xx_keypad - fix handling of platform_get_irq() error Date: Tue, 27 Oct 2020 14:49:36 +0100 Message-Id: <20201027134915.510188262@linuxfoundation.org> X-Mailer: git-send-email 2.29.1 In-Reply-To: <20201027134909.701581493@linuxfoundation.org> References: <20201027134909.701581493@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Krzysztof Kozlowski [ Upstream commit 7d50f6656dacf085a00beeedbc48b19a37d17881 ] platform_get_irq() returns -ERRNO on error. In such case comparison to 0 would pass the check. Fixes: 60214f058f44 ("Input: ep93xx_keypad - update driver to new core support") Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200828145744.3636-1-krzk@kernel.org Signed-off-by: Dmitry Torokhov Signed-off-by: Sasha Levin --- drivers/input/keyboard/ep93xx_keypad.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/input/keyboard/ep93xx_keypad.c b/drivers/input/keyboard/ep93xx_keypad.c index f77b295e0123e..01788a78041b3 100644 --- a/drivers/input/keyboard/ep93xx_keypad.c +++ b/drivers/input/keyboard/ep93xx_keypad.c @@ -257,8 +257,8 @@ static int ep93xx_keypad_probe(struct platform_device *pdev) } keypad->irq = platform_get_irq(pdev, 0); - if (!keypad->irq) { - err = -ENXIO; + if (keypad->irq < 0) { + err = keypad->irq; goto failed_free; } -- 2.25.1