Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp187322pxx; Wed, 28 Oct 2020 02:06:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwzVHDByP3qkpXCrlqhATVyO0QTfFWflkZovgF/a/uAXx83grWHWNqGh2Rf5j9PWODrUbfH X-Received: by 2002:aa7:dcc7:: with SMTP id w7mr6836601edu.54.1603876005432; Wed, 28 Oct 2020 02:06:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603876005; cv=none; d=google.com; s=arc-20160816; b=TT4eK2aM9ek63/7od5WEy0v1rC+nY9B1mvQMtWTa0wjyNe+HGwqtmIVEtHvI6mz+7U Zeo945MnqBN0OLOtFHMRsAgZRfHR/GfPK75lit0Uq43USIKfBIFX+f5GyodjPWLmpLQJ cYz4ShqVaf4WjxIBr+6HEdr2ErUabxgANVviU/BP1CGdp3D17JZ7Q5okN6VppFOih2ix unqnm3C9Zakeo4KcZJa0yXbR4vMlamTanNRhYn1oTb3mFpwxiPWgb/1SbfCKs2hywvMd ZYSxONHeUL4DC28vysZId7VKsmZLVQx2huX2hjitCViMt+e4cxeDtL7hvBWP9jwg68Gd QQLg== 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=gJr/Hj4kAvl38fZopuk23uV9I71NwHgXmNYeghohi7bRmM97J6N+DJuhXVQwmOIPLO fRpd7dWnDcWtZ6dCt1ActpijvA01YifdZXbF2lL82kpzuEW1KDKuPYlJlUr7K2RB4LNs 4xZ7qsoC3VRjrpo6kB1HIriFkPwDE84pkfat7SNGBSa1q+44vjyMr5lQlTM5UCBBV/x+ 2b4YA7dRVxM/VdsCCXCCsDX5XlO67LtHrKWGwuEs0AuejJ5c45DnJaCh3TyLws8c+RxM DotFpxlwh4YlgBE05omR6YLoRJ+A6FXSRXRwMk1fZfSuM/5wLWysQ+xwTTfVvZgI7p4W 7XZA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=poDixNhH; 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 t1si2868715ejb.712.2020.10.28.02.06.23; Wed, 28 Oct 2020 02:06:45 -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=poDixNhH; 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 S1757018AbgJ0OPq (ORCPT + 99 others); Tue, 27 Oct 2020 10:15:46 -0400 Received: from mail.kernel.org ([198.145.29.99]:53626 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754380AbgJ0OFS (ORCPT ); Tue, 27 Oct 2020 10:05:18 -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 D79B822263; Tue, 27 Oct 2020 14:05:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603807517; bh=Gm6quWG61QDKSQll4BJQfDy3dvG4rp4sAm9JUEJKn28=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=poDixNhHDq7y1pBdoLOLhoFA+aIx5thnggDsWycIOZ3R18cxNeqXsmR+WSmvXe1p/ Rha8qtxNOQupuDegLPpEJJpTMXEDTBdXLwfngBtWLrxqX0OzbK68yJCYa/vET2Pbvj 1V8koZEXfWrUiZ9tUGLQkVYuE/RyOPQ1tP4/5zlc= 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.9 082/139] Input: ep93xx_keypad - fix handling of platform_get_irq() error Date: Tue, 27 Oct 2020 14:49:36 +0100 Message-Id: <20201027134906.023495547@linuxfoundation.org> X-Mailer: git-send-email 2.29.1 In-Reply-To: <20201027134902.130312227@linuxfoundation.org> References: <20201027134902.130312227@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