Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp5297246pxu; Wed, 21 Oct 2020 20:42:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwWKdM6Pyfkn3bUDIB0+2BTi0elsijT9DxCd6mR9DWcicDp1pH8gQDJINPgzkvTufZ7rYAN X-Received: by 2002:aa7:d28a:: with SMTP id w10mr504301edq.192.1603338159734; Wed, 21 Oct 2020 20:42:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603338159; cv=none; d=google.com; s=arc-20160816; b=09EpL6Rr3p9N8j26nJwnPQPmzo82WnDn+ijNUnpB3qMHocllq2hbkAgCvTs3Ewnezo Trnj24VL9HgGDK5Cij4dP+5+IRj2WukTk1LLuQhH16vo1ChDq4UepmWZoskLvi9UdPvU iW9WutbNN0FjaooCZSldzUTVVF+0zriSa/Nl0PPKvp5NIBAaHfQ5DG6mreF/SL9CXq5e 43nDh+QJoYXRwuF8if2gMweEnZQwSOz6dsoe2Ba06FmKbLqw3Mlacfq9BUuI66MzHuEP AXTIROVZPKaYpC4yi0mppRBMIZMNLTI0ViPft1w5Rr6EULdiEc9EOfMHtA3poX51Y6tl b8sQ== 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:dkim-signature; bh=zmZGMIPGGmtLtowrdMYO23WbB3s1asSBgU+m0EE+qT8=; b=obRcV/hiDA4uMSzuxe7Oca+hRbvC94Kqfj2c7WjE+nssfZ7Jbl5afCrVAgiPWaQGkv Uep2rFpAhUrSwO8o25B9YExlKz0FQuB7G2iOq3lhR8mEQF2tzi2/vaGdn1xcbq/RhGZr vEoaYaFAFYgTvVqzDK+5BFt4dMl/c/33+AYUIiHHlCu0KSskt1W4NKLX8F1k+Ym5q2U2 0VQulHVxedFf7Mtn+tGr5KLKWRMdgiysayaBk3rF4bzyf3IYZ1ytBfbtK1FVz2RD2tvk Tp16dcmn+zpkTYdHVMPBtAMjR/i4Ep6/F269HdpO//S80AmWaFOk093rOX9DielKrGfR EXEg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=ATLgApS7; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dp13si148110ejc.122.2020.10.21.20.42.06; Wed, 21 Oct 2020 20:42:39 -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=@gmail.com header.s=20161025 header.b=ATLgApS7; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2441714AbgJUOdU (ORCPT + 99 others); Wed, 21 Oct 2020 10:33:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37478 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2410075AbgJUOdU (ORCPT ); Wed, 21 Oct 2020 10:33:20 -0400 Received: from mail-pg1-x542.google.com (mail-pg1-x542.google.com [IPv6:2607:f8b0:4864:20::542]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 88F51C0613CE; Wed, 21 Oct 2020 07:33:20 -0700 (PDT) Received: by mail-pg1-x542.google.com with SMTP id t14so1599134pgg.1; Wed, 21 Oct 2020 07:33:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=zmZGMIPGGmtLtowrdMYO23WbB3s1asSBgU+m0EE+qT8=; b=ATLgApS7Y80FNwvZ59Dzx4Y98S/P7jDo7kQJJJgQP3SLNhb61qwUzAke6Z4Us9MI+w amFiRq8p/6tr3CPdWn/v5kf5ev+H2TBTcFiBg5/oLWrG4YzsSgicwBIhw3DYfaTJdRa9 EsA7RQbQ1NMsWLqWoydbuIuMu3sUV3Lz/rMbT7ulWLk0kGH4cNx15yinvtuXWwBHwvMj rJoOiPdrOxs/mAZIs90I5BZZJlw4WyoumAjK5AAVoWOdUOjrL87jQG4McHNX+ei+saDn RAIeG/e8G5EOKIifz8d0NF5cjN7sD5MXYIxmwnaUaDZeBGiBbEVw2hNeO4O9Pt70OVNU 2+Rw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=zmZGMIPGGmtLtowrdMYO23WbB3s1asSBgU+m0EE+qT8=; b=Q8VhHMh90VyWHuRovZg1L6u1f460W8F98tIgVTKqgKJY69YtrC+Nxs8Ce2sOM3Ducg Lk4uQ5jBh14xDrQTX4F1XUWBNx66ECWN2AZuSBCzIT0bU53FdaPMOop8g/m8479A8Y18 ig75NUDuAZYFMtbEbTUisqXum2tdpYpStH29R02jfUsXMRZ7rx0runKj5sx9HiXV7vgF itaAS9Vg+rorXw1EbAxvXqVEZIsRZC/OsuI5I5uchUCTnxB5rEUKRvUeXvIpwfPgQFxy fcQRvRyYGzrj0zW9Q8tx8nZUz5Xp0xl8/K/yCcQuNBIdgvN6nvyWynJBaef4k7QtEc1p K0sg== X-Gm-Message-State: AOAM532mi9HUu3iLFrP2ISeRK2Te09b0ZP3B7SXUje1u/U9ZF72IXKD6 qZsh2BG1WzCQNSOCG0losFeJvE1sJ/Iy4A== X-Received: by 2002:a63:3004:: with SMTP id w4mr3606200pgw.249.1603290799359; Wed, 21 Oct 2020 07:33:19 -0700 (PDT) Received: from localhost ([2001:e42:102:1532:160:16:113:140]) by smtp.gmail.com with ESMTPSA id hi22sm2384987pjb.21.2020.10.21.07.33.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Oct 2020 07:33:18 -0700 (PDT) From: Coiby Xu To: linux-input@vger.kernel.org Cc: =?UTF-8?q?Barnab=C3=A1s=20P=C5=91cze?= , Jiri Kosina , Benjamin Tissoires , linux-kernel@vger.kernel.org (open list) Subject: [PATCH] HID: i2c-hid: show the error of failing to fetch the HID Descriptor Date: Wed, 21 Oct 2020 22:33:05 +0800 Message-Id: <20201021143305.475182-1-coiby.xu@gmail.com> X-Mailer: git-send-email 2.28.0 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 i2c_hid_probe should notify the user of the error of failing to fetch the HID Descriptor instead of silently exiting. Link: https://forum.manjaro.org/t/elan-touchpad-working-in-live-but-not-in-native-os/31860/55 Cc: Barnabás Pőcze Signed-off-by: Coiby Xu --- drivers/hid/i2c-hid/i2c-hid-core.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/hid/i2c-hid/i2c-hid-core.c b/drivers/hid/i2c-hid/i2c-hid-core.c index 786e3e9af1c9..577d324be16d 100644 --- a/drivers/hid/i2c-hid/i2c-hid-core.c +++ b/drivers/hid/i2c-hid/i2c-hid-core.c @@ -1099,8 +1099,11 @@ static int i2c_hid_probe(struct i2c_client *client, } ret = i2c_hid_fetch_hid_descriptor(ihid); - if (ret < 0) + if (ret < 0) { + dev_err(&client->dev, + "Failed to fetch the HID Descriptor\n"); goto err_regulator; + } ret = i2c_hid_init_irq(client); if (ret < 0) -- 2.28.0