Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp399461pxb; Wed, 3 Mar 2021 06:13:04 -0800 (PST) X-Google-Smtp-Source: ABdhPJyjOPn8OyKsHB5QbeBsmQ/DrZJ398B6coseGuk/E/fAV1o/Six1m70SCPzLFqLB8fPLX2UU X-Received: by 2002:ac2:47eb:: with SMTP id b11mr11721623lfp.390.1614780784037; Wed, 03 Mar 2021 06:13:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614780784; cv=none; d=google.com; s=arc-20160816; b=bNJA8vevjH8d/eIfY9acyPnUWwjHnWlgnsYO9OfERvgf/Z4Qinj5w1b+3Zf9EaWW+P uCR3OceROkMx25cpIEbZZQQVPv/oXvxa+gVW61MWqqk3JJ9K2VNdvm5mUSiljfDNJuwX PjUWhrh30yrWhTjhDxG85F0B8DDZ11MemdDuPglFIkSCkYauKOOj4XOcdnMbx9h2+8re Awrp94jifb6ltoDEJY2Y2SglrN1PsFT2obI1+98sTUHPPbJdJ/MQBAUlw2n+CuzOREOU 2nVmuwc8FeXnH/gCMVNhgT3kit0PJPoaWxf46GhQAQhPoxkpwy/IC80Ib5cbweqi46lH Y2lQ== 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=HUjb9PFzmg0h9nqIFEs8Sjw8YdxOtrlubtKdY4EqcvU=; b=fWeGXSn9WNkxStD0NiIxKrqruZUoN+Ux6OmT5tjzbbEH/6pbsfJABy7YHoILies/Qr KXyCsNfHIA16VnG5qUmdyxXKrpqOWeuJUu7a0gUEU7YQm9c/xBCQGPJLnorIyr0wUrN4 idXxiufrkGK2rtAzsmwPMroKykkcZ0sbcJfNUS/JW1Y4QYW0BsVyKR3n8SmCNlfkehzW tHD20dYQ5WeoRGzWhAqOZ3pE9131gOkhz9EDDE5rR3wsu4rxENo46AcWVNPLc6tVdBun f3kDDNVgovfaPUU8AZA3IgHsdyyLpIFYsrNPj4IgDAS+QIziU5HE0NRzIma38HY5/t10 UamA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=of2xwst3; 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=pass (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 g20si8115409edy.270.2021.03.03.06.12.19; Wed, 03 Mar 2021 06:13:03 -0800 (PST) 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=@linuxfoundation.org header.s=korg header.b=of2xwst3; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243939AbhCAUxk (ORCPT + 99 others); Mon, 1 Mar 2021 15:53:40 -0500 Received: from mail.kernel.org ([198.145.29.99]:46318 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237090AbhCARKG (ORCPT ); Mon, 1 Mar 2021 12:10:06 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 6030F65021; Mon, 1 Mar 2021 16:42:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1614616957; bh=fZ5PhIh7UxpcmY0p6jEo7owvyW711H3IXrhaPTtmlj0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=of2xwst3gI7x+KpMZu7hRCvp7OW6AEVpwnOFPD/bJ07h2wOUivk/Y9YyaLLUZ/Hmd Xojp+ct6fpkB8al9Yxycm+BB4V8X2QXRIlRSK9ZfAQvRhVWC1ENttGVhckoNlzpIz7 xhTo/Cbo2XkkttPHZhU92o6/7uiB+MED2E2eCNFM= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Dan Carpenter , Dmitry Torokhov , Sasha Levin Subject: [PATCH 4.19 152/247] Input: elo - fix an error code in elo_connect() Date: Mon, 1 Mar 2021 17:12:52 +0100 Message-Id: <20210301161039.103239665@linuxfoundation.org> X-Mailer: git-send-email 2.30.1 In-Reply-To: <20210301161031.684018251@linuxfoundation.org> References: <20210301161031.684018251@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: Dan Carpenter [ Upstream commit 0958351e93fa0ac142f6dd8bd844441594f30a57 ] If elo_setup_10() fails then this should return an error code instead of success. Fixes: fae3006e4b42 ("Input: elo - add support for non-pressure-sensitive touchscreens") Signed-off-by: Dan Carpenter Link: https://lore.kernel.org/r/YBKFd5CvDu+jVmfW@mwanda Signed-off-by: Dmitry Torokhov Signed-off-by: Sasha Levin --- drivers/input/touchscreen/elo.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/input/touchscreen/elo.c b/drivers/input/touchscreen/elo.c index 7f2942f3cec6e..0f3146bcfcd0f 100644 --- a/drivers/input/touchscreen/elo.c +++ b/drivers/input/touchscreen/elo.c @@ -345,8 +345,10 @@ static int elo_connect(struct serio *serio, struct serio_driver *drv) switch (elo->id) { case 0: /* 10-byte protocol */ - if (elo_setup_10(elo)) + if (elo_setup_10(elo)) { + err = -EIO; goto fail3; + } break; -- 2.27.0