Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp162703pxx; Wed, 28 Oct 2020 01:12:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxZ6V8Xf36dMwask1PVbHWjOL1P0tNxsk+1xMIWRIK5Nekg/xnWrWDGRkh8Fg9j4I863ol3 X-Received: by 2002:a17:906:bc42:: with SMTP id s2mr6221232ejv.251.1603872749511; Wed, 28 Oct 2020 01:12:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603872749; cv=none; d=google.com; s=arc-20160816; b=r/a/zXJybtt9uXtoSJg40NzFavXTCmfENlqJ3eyvnjODAWI1LpEeQBGhGs/gtAmuox g9tP6Ly6a1hC9TyQcSmXGT5Slz0mRd6SX7wYcStXyV90sGxmAzBa7smim6/26Rervv93 z4FsmzZo08H4Z2y67o4lBWOumGjL7FY6X5MA5tE/ZyQ09L5XCRWMZ1FnzYCYQYBN1GNU m6OC9XienWc5VRJ/14Ag74u786zNYpExcmsYZfmtA44mmFWUXoqFc+TbBYokiuL9optn 2w1I0Wryknl5dSPC03usR78qlLXnuM6MMTpH5LCbNzjd5j/KvsS7dHNOJsbOvuNDMBQW +76w== 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=GJS+NqjDw81HGkzdV56siwDhs0Ml7KOlkY877v7CVW2OupJtTDAQLy9YBJIpy249Sx 5KcFPhS3HSpEBO574tLMJQoiX8a8oPEMki3cz6EN3+zuUJcL9aCvltump1qHybikNSKv u1JlZ0nf+jk8AEkdxfiUXlN3WWhsmIO/Oe0Qf6eaPOrS7Mv6cIPJXMxMqKXHZGT/TOp9 2TiwO54vcYqytY4tviDiJTCXQkw4PrUCs3p8XaIqAb0VJg38fZ54GDicf5ue1ErEcddT GSblb9WHTMXDMUN7elGu3ysJiU8MXV7fLRal8IsnzKoSjlZqUjHNIz4BAW/fOXyDd/Wd vGWQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=XhONE+VK; 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 s18si2795558ejd.147.2020.10.28.01.12.07; Wed, 28 Oct 2020 01:12:29 -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=XhONE+VK; 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 S2504443AbgJ0N7i (ORCPT + 99 others); Tue, 27 Oct 2020 09:59:38 -0400 Received: from mail.kernel.org ([198.145.29.99]:47010 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753265AbgJ0N7b (ORCPT ); Tue, 27 Oct 2020 09:59:31 -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 C80CE2068D; Tue, 27 Oct 2020 13:59:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603807171; bh=Gm6quWG61QDKSQll4BJQfDy3dvG4rp4sAm9JUEJKn28=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XhONE+VKGTyDYXB0IUXy9+RH0qRpb+HtG6sIIRh+ewqEN0Tbwt1lQOJjYNiuwCwze iFsJx3OejeiIt/m3ZSXZHXGjehOrYec3CEYw43JJagxdFcC+TCCtFdNXo55UPECHAA lcBrKZyUP05aMmKf5K9aTTpjCDcWSq7Iyq9BcF1c= 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.4 069/112] Input: ep93xx_keypad - fix handling of platform_get_irq() error Date: Tue, 27 Oct 2020 14:49:39 +0100 Message-Id: <20201027134903.833071477@linuxfoundation.org> X-Mailer: git-send-email 2.29.1 In-Reply-To: <20201027134900.532249571@linuxfoundation.org> References: <20201027134900.532249571@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