From patchwork Sat May 15 03:00:53 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhen Lei X-Patchwork-Id: 439425 Delivered-To: patch@linaro.org Received: by 2002:a02:b78d:0:0:0:0:0 with SMTP id f13csp845981jam; Fri, 14 May 2021 20:01:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwOOPp6j7fJgdbN+3yI172rF212TxR/6XZymEoNpgv+ZgTwoNkqTVPkO+V0zVuNZp9x3zrg X-Received: by 2002:a02:c98a:: with SMTP id b10mr46051064jap.103.1621047674672; Fri, 14 May 2021 20:01:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621047674; cv=none; d=google.com; s=arc-20160816; b=XNumux70YJDQataaVhUk92On0ef/anqZ/ak7kXimL8ztNlNifIm5ZxzUfC+FBp9nTu gOmx00EIij29AxVgY3pcY+ipd20RfEMplO19Jkrqy3bxqHjyQwhmJuPSHm5/8lnNi0Gi EJDgUnqEL5BdjfcXBIf2ATqi74MlmFBhjJikbb3hA5P0v+uncCVlssvJK32uZmkqxRTa kKQWpJLIcbI3IEEj6HNv8EzCn5701vdltl/LWHq/poNX8lBrk3ZunUUuPG/B95vROHcN 6eYyq2woBZyANclufjkpiVwbmvc44w/HMCRCaseOw298GGLYLyE+IqGurxIB0dIYPiT9 NpqA== 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 :message-id:date:subject:cc:to:from; bh=MRSDtstWc9L0SR+Qqp0FTT+LbWcOWMqv4L48hNVW1WM=; b=gTdQ64n1yZxArWm3DTxh0pDZT3LHB0AF3U6eiBHAIEYWfQcdMDN40/Pxzxge3s1e3J vP4x8LoK9ObyIUQVPjYS7stPfIvx8k0hc4A1Br6qu04O1WYfAR/HVXO9+UK1PwiFkX/+ rw2QccO2xDs0pRobkhNVQnLhsutd3cRhSO1+KIPd/J3F95LCFi9cLoF9Rmg3/QU4Q6ma 8Bumec0g09aNpqMHOH245bIJ61XgKiDWKtiwn2Ca35Bd4kh+xMW+F2u9sWSS0Cn45fLH xl6uLxv1uxUumk4qhKbV11h//HyOoufEmNMi/EuIXjgkiLSr2VzEqMaz7uuSxjZpq7mA CODA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-input-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-input-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s6si9387554jao.56.2021.05.14.20.01.14; Fri, 14 May 2021 20:01:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-input-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-input-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-input-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234117AbhEODCZ (ORCPT + 1 other); Fri, 14 May 2021 23:02:25 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:2925 "EHLO szxga07-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233403AbhEODCZ (ORCPT ); Fri, 14 May 2021 23:02:25 -0400 Received: from DGGEMS401-HUB.china.huawei.com (unknown [172.30.72.59]) by szxga07-in.huawei.com (SkyGuard) with ESMTP id 4FhqpW5PSTzBth4 for ; Sat, 15 May 2021 10:58:27 +0800 (CST) Received: from thunder-town.china.huawei.com (10.174.177.72) by DGGEMS401-HUB.china.huawei.com (10.3.19.201) with Microsoft SMTP Server id 14.3.498.0; Sat, 15 May 2021 11:01:02 +0800 From: Zhen Lei To: Dmitry Torokhov , linux-input CC: Zhen Lei Subject: [PATCH 1/1] Input: hil_kbd - Fix error return code in hil_dev_connect() Date: Sat, 15 May 2021 11:00:53 +0800 Message-ID: <20210515030053.6824-1-thunder.leizhen@huawei.com> X-Mailer: git-send-email 2.26.0.windows.1 MIME-Version: 1.0 X-Originating-IP: [10.174.177.72] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org Return error code -EPERM rather than '0' when the combo devices are not supported. Fixes: fa71c605c2bb ("Input: combine hil_kbd and hil_ptr drivers") Reported-by: Hulk Robot Signed-off-by: Zhen Lei --- drivers/input/keyboard/hil_kbd.c | 1 + 1 file changed, 1 insertion(+) -- 2.26.0.106.g9fadedd diff --git a/drivers/input/keyboard/hil_kbd.c b/drivers/input/keyboard/hil_kbd.c index bb29a7c9a1c0cf5..ca38e8e20bb5484 100644 --- a/drivers/input/keyboard/hil_kbd.c +++ b/drivers/input/keyboard/hil_kbd.c @@ -512,6 +512,7 @@ static int hil_dev_connect(struct serio *serio, struct serio_driver *drv) HIL_IDD_NUM_AXES_PER_SET(*idd)) { printk(KERN_INFO PREFIX "combo devices are not supported.\n"); + error = -EPERM; goto bail1; }