Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp507590pxb; Wed, 3 Mar 2021 08:30:33 -0800 (PST) X-Google-Smtp-Source: ABdhPJyWvmcr+n5xp0CZx6w15MT6i5BISptadWtfj41ZmBiJHzJ5qK5gxCAriOhycxISgvKe6sFw X-Received: by 2002:aa7:de8a:: with SMTP id j10mr111654edv.84.1614789033207; Wed, 03 Mar 2021 08:30:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614789033; cv=none; d=google.com; s=arc-20160816; b=A9XAOYrOJ09evbWm9Ya3lC4GFsmKOplAGi9uP+SLwH/IOmNt7i83gHxhLZShpMX+pg KHff5AKU9ioU+aKLVC/Q6DGLLFGor2b4qNjI4sV0j6ZW34KRHVH0SlONOZoYD6BAhFLR t120D0d7JvohmsL6ewBUNAAyPLUYTN6Jv1j/a0oWJsQr4YQtiB12FILzX+KkAUnKh7wg 1lCNFo3ftLjZ/nzIHmAaDVfXgWams+CB8aCQnLXdQErX1XH4vQ8vFwetvqasj1pCCEIm k3CIh04YiyzR+x3pKIQIaFrOjfm4CfmmVDwx8QJSyURjdVAZANeIeE7w+zogBv0C4fFY bcPw== 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=sOXT4FDrFtn9fmkMJVf5OOpTIzzxY3edY7Y+z6m2aSY=; b=wB2S0Es6KekYHOyzfAgqnynrqevKlWx7syVfbL2b8gn40uWyP+xqN9vWXomdj5DON9 ePPQ1/zNIol+bRG/tUOpqBaOddMLCQSZMKFDcmPsSKLcxbbj9fKY9nK4fh6rFNP1W0jc fNAygkCWAvs18x75pYf/HvYcFYzVS7Nueoar/caIpNMGg9qyjC5FnDB33tM2ooJ8XwZH +5wRPsHYxMgOwxFVxPhZyz7ounE9nMBjN0vIWXBL0yWKZEvhC8HO15q2odZ7AnD3p1D6 GRKdFAOhqa6++6glVT5gg+mMQ8FlSnjwHD9GjIvxiGWFX3l2BegAZnC7sA8VylRiXaVP wPeg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=FNemam3o; 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 r14si14932882edb.408.2021.03.03.08.29.58; Wed, 03 Mar 2021 08:30:33 -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=FNemam3o; 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 S1347038AbhCAXvi (ORCPT + 99 others); Mon, 1 Mar 2021 18:51:38 -0500 Received: from mail.kernel.org ([198.145.29.99]:34256 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238964AbhCASRA (ORCPT ); Mon, 1 Mar 2021 13:17:00 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id F2A4764F8F; Mon, 1 Mar 2021 17:20:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1614619260; bh=TEeS+X8+mLBD9qzmnxZPrl0wdf/OS/FZ/9ygfXnn1jo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=FNemam3owv6oAJ2CPN6Q901uu9qfaxCVzEHClcJofn9haiGex/unu6TsrmX1RH/sv zrWL1ZIFxePD2AX0EGx/d1Z15cBzmHmmWsOhDdVoL58oihTJLq9Z9WeLfevJV099Ou sMJwphSj80z/8fmFGU56N49u0Xl8CIcCc+c4KCIk= 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 5.10 389/663] Input: elo - fix an error code in elo_connect() Date: Mon, 1 Mar 2021 17:10:37 +0100 Message-Id: <20210301161201.110863201@linuxfoundation.org> X-Mailer: git-send-email 2.30.1 In-Reply-To: <20210301161141.760350206@linuxfoundation.org> References: <20210301161141.760350206@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 e0bacd34866ad..96173232e53fe 100644 --- a/drivers/input/touchscreen/elo.c +++ b/drivers/input/touchscreen/elo.c @@ -341,8 +341,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