Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp255551pxx; Wed, 28 Oct 2020 04:13:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyt6MffgeOFovpS9tPKb5BBEsOAsxk4TW5G+No+HuTYonkdiOQxOIwMI00+PzleL98CiCRh X-Received: by 2002:a17:906:f185:: with SMTP id gs5mr6898755ejb.107.1603883636886; Wed, 28 Oct 2020 04:13:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603883636; cv=none; d=google.com; s=arc-20160816; b=lxpEAdGIgcDIA76nMSD+g2Qou9iwfPCbj9qcjZ6rIIELjZCSL2xuryXvCodKgO5DFD dfTZk3MeHb/WdijkKWy3B6xLjBB7csAlCzAsgiUB6G+IOdT+/xcx1bgLPNSpLGTF4/JN nyZtlG7qyFhJAKLFlP0BGbQjQt7XbqvDZa22TYI6KYoKj4OyDQmcRpg2UrlRefJy6vNe ejFLs2dEK073mXhIze47PiAvAozR3eJFpBANFvf3vr4xBib8wpVHlsshJKQnQE+DcZMl 5Axv5xd0GMhsxf17oL1YoDM7xoQ8rNGPZqaLXitaeuIWaUvoL0AJNlaAoiW0PtIrG6Mt DmYw== 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=368YXtPEEF1pBEaVotrOS77bUsdcJHyMWaz/5hImi8k=; b=JPD6R2ONQgqUW1C2R+nNEa0FxnJKCHm15A1LFDd+mLWAG88A040OfERM5v/i0mli6u ADVOtKLAsMW7quTuIhIXuxVPRob+9esLuzr5AfKjrszFoPESebbPX4NHBI9qoMh39a1c +9h10RkIGnk60ADAqmEkHs0/vKjv1B95ij+tE26ruCmxOa88f8ZZui37TFtRN1OtNEhz GGccYOVBs+4jyyRVynhzXjQdNLPuPsN3XpNnLVixHUgFx9H/xE8bFrHAsY616gktSDk+ eYQZ5BWOuJkY/n7ZS9cYSu5WfNc5hpfxvCOTNqEBmWiwEKgph9eJEk6f6Ar2S+HqRnGI vwog== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=lpd9Hr2A; 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 g8si3473416ejm.389.2020.10.28.04.13.35; Wed, 28 Oct 2020 04:13:56 -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=lpd9Hr2A; 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 S1787215AbgJ0PAB (ORCPT + 99 others); Tue, 27 Oct 2020 11:00:01 -0400 Received: from mail.kernel.org ([198.145.29.99]:42766 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S367976AbgJ0Om7 (ORCPT ); Tue, 27 Oct 2020 10:42:59 -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 927C121D7B; Tue, 27 Oct 2020 14:42:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603809779; bh=t2Od6mWeBioSTjcrzJNg+IRK4kWLCIklU0gs417aVLk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=lpd9Hr2AWcBJnJKs1j0N/KhLRTZNHbNs0tNodlzoO+8mVS7DnFZj5O7hNTGNpfSWH OkA8VjfhP7Im89BbfzIVIR/hWxehDHpDgoLGOR13u7e92HXWlsvxXLhQjE9Ji+iGfx ySPnuh2f3E6+9amV4ZmWUtl8OB+e1DO8jIaR4SSA= 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 5.4 286/408] Input: ep93xx_keypad - fix handling of platform_get_irq() error Date: Tue, 27 Oct 2020 14:53:44 +0100 Message-Id: <20201027135508.307050253@linuxfoundation.org> X-Mailer: git-send-email 2.29.1 In-Reply-To: <20201027135455.027547757@linuxfoundation.org> References: <20201027135455.027547757@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 7c70492d9d6b5..f831f01501d58 100644 --- a/drivers/input/keyboard/ep93xx_keypad.c +++ b/drivers/input/keyboard/ep93xx_keypad.c @@ -250,8 +250,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