From patchwork Thu Jan 28 09:35:51 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Carpenter X-Patchwork-Id: 12053265 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 20FF1C433DB for ; Thu, 28 Jan 2021 09:40:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id CBF566146D for ; Thu, 28 Jan 2021 09:40:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231408AbhA1Jj3 (ORCPT ); Thu, 28 Jan 2021 04:39:29 -0500 Received: from aserp2130.oracle.com ([141.146.126.79]:36398 "EHLO aserp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231641AbhA1Jgs (ORCPT ); Thu, 28 Jan 2021 04:36:48 -0500 Received: from pps.filterd (aserp2130.oracle.com [127.0.0.1]) by aserp2130.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 10S9FE15118562; Thu, 28 Jan 2021 09:36:01 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=date : from : to : cc : subject : message-id : mime-version : content-type; s=corp-2020-01-29; bh=R1Fdx62Xf99Nzq0W82FyQBbmwyGKC1XkdoIOB/k4UWY=; b=sFrH09d1HGxtjiY0UMp6vCb1pDf26ztgRvD6dy17ROOoTPvyJ5vQ56f3Apv2oQXgacft fjQjtmmxlXL5fBH/HWh/5GclgAK0kPVB74nKXkspW7vs9RsEiDphydCYn5+F6TxVBDs9 3TE4cI1KGTBm6Rv8YBD+pmgh+DDKh1cZ+9AYcHHQQzNNP0sf0H9v/OHiR3mV38jOzOgl vlAD/z131TGICuzMPUvieN67SdH1D8YnLJnKh8FYQXYU6UTbPZjI4BIqcS0HAqClT/FK bKtnnVCHTdf0vQ19v/OSW89CZF2sPS2R7zV87WDi1tsvlfSZHzs7i2WGLWBEydvPyyNA fg== Received: from userp3030.oracle.com (userp3030.oracle.com [156.151.31.80]) by aserp2130.oracle.com with ESMTP id 3689aaubjb-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 28 Jan 2021 09:36:00 +0000 Received: from pps.filterd (userp3030.oracle.com [127.0.0.1]) by userp3030.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 10S9GE6H156504; Thu, 28 Jan 2021 09:35:58 GMT Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by userp3030.oracle.com with ESMTP id 368wr02qhb-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 28 Jan 2021 09:35:58 +0000 Received: from abhmp0018.oracle.com (abhmp0018.oracle.com [141.146.116.24]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id 10S9ZvGP024403; Thu, 28 Jan 2021 09:35:58 GMT Received: from mwanda (/10.175.203.176) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 28 Jan 2021 01:35:57 -0800 Date: Thu, 28 Jan 2021 12:35:51 +0300 From: Dan Carpenter To: Dmitry Torokhov Cc: "Gustavo A. R. Silva" , Shaun Jackman , linux-input@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: [PATCH] Input: elo - fix an error code in elo_connect() Message-ID: MIME-Version: 1.0 Content-Disposition: inline X-Mailer: git-send-email haha only kidding X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9877 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxscore=0 spamscore=0 phishscore=0 adultscore=0 mlxlogscore=999 malwarescore=0 suspectscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2101280048 X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9877 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 malwarescore=0 adultscore=0 lowpriorityscore=0 mlxlogscore=999 clxscore=1011 phishscore=0 bulkscore=0 spamscore=0 priorityscore=1501 mlxscore=0 suspectscore=0 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2101280048 Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org 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 --- 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 e0bacd34866a..4b2fb73da5e2 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 = -EINVAL; goto fail3; + } break;