Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp1493539pxb; Thu, 16 Sep 2021 08:35:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyXxOULMLoXvKQlwUWuKd9Hx1Eli7M/aHW3/ci1iK38J8ZzfuQDLd3IUu2/+9RAtZVQEo+J X-Received: by 2002:a17:906:2f94:: with SMTP id w20mr7193707eji.14.1631806537439; Thu, 16 Sep 2021 08:35:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631806537; cv=none; d=google.com; s=arc-20160816; b=jNDvNGImasGCdNGKsMtrUMxNz7aP+JM7h6guR70FACo46Y3Egb/J+BfczTcCrLimVG 5udugP7e1XaJLOQ0iZaKNDxV/gfXKnT4HcIenxmUA8Q3sWDhPzYsYEbAfPoGGl3HKQgj 8PTw976P/qe7VbGoxw890lPi01md7gtT1haeBlM//H0YaIsAwwHlISTVXDFl5xROebkr 3qgkqK9TBaZhj0hwoJeJVwo2qBpfXX/RrhPWesuxkudjbwZYVz76Ag+Da5foRgWcXkwf WG/Dcf7BOJYxUpE917eqfh/wB/L7wOzXXuJTjI/UxGX1FtGm2DR79v6ZD6PLeBLOsCYc Dwsw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from; bh=mcRu3wlIYYNGEssLxjIWxxM19rCeaoflkaXtH3ONmII=; b=jUfKPyzI/2y1vyazuvghPoNaiAzbLZAvFNI3i6oIGsot8vJRwoJYoUj/jbX0UO/Q40 MTR0u5Lkv+hPWHLhvW7T6mkJ/Sp1sXqu1K5pEaL0hoJFcwUUGf3Mv7zftFvAepoBy6bJ WSjR03CUEB6aGbAii/cUO3QntD7Ba7k6x6YCiQFqElMMytoubL0vNtV/XiGvxW3Nma7W ZxNH7UJndYD2bBJdYRX3+B91v8fNUqyzSMPpCBAyjss4YHbvuI3v9O7aEx+BXbHSSKjx KU/uPqjvXSMROUBPiuWGD3eRpShZzDrZcjqRlxEnnoglXalWbEwu4xjM6ArMel+HiNf0 P6MQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e20si3926924ejl.254.2021.09.16.08.35.11; Thu, 16 Sep 2021 08:35:37 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239309AbhIPPd1 (ORCPT + 99 others); Thu, 16 Sep 2021 11:33:27 -0400 Received: from mx24.baidu.com ([111.206.215.185]:33304 "EHLO baidu.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S239344AbhIPPdY (ORCPT ); Thu, 16 Sep 2021 11:33:24 -0400 Received: from BC-Mail-Ex32.internal.baidu.com (unknown [172.31.51.26]) by Forcepoint Email with ESMTPS id 091283D1F30F32112758; Thu, 16 Sep 2021 23:32:02 +0800 (CST) Received: from BJHW-MAIL-EX27.internal.baidu.com (10.127.64.42) by BC-Mail-Ex32.internal.baidu.com (172.31.51.26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2242.12; Thu, 16 Sep 2021 23:32:01 +0800 Received: from LAPTOP-UKSR4ENP.internal.baidu.com (172.31.63.8) by BJHW-MAIL-EX27.internal.baidu.com (10.127.64.42) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2308.14; Thu, 16 Sep 2021 23:32:01 +0800 From: Cai Huoqing To: CC: Linus Walleij , Dmitry Torokhov , , Subject: [PATCH] Input: cyttsp - Make use of the helper function dev_err_probe() Date: Thu, 16 Sep 2021 23:31:55 +0800 Message-ID: <20210916153156.14098-1-caihuoqing@baidu.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [172.31.63.8] X-ClientProxiedBy: BC-Mail-Ex09.internal.baidu.com (172.31.51.49) To BJHW-MAIL-EX27.internal.baidu.com (10.127.64.42) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org When possible use dev_err_probe help to properly deal with the PROBE_DEFER error, the benefit is that DEFER issue will be logged in the devices_deferred debugfs file. Using dev_err_probe() can reduce code size, and the error value gets printed. Signed-off-by: Cai Huoqing --- drivers/input/touchscreen/cyttsp_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/input/touchscreen/cyttsp_core.c b/drivers/input/touchscreen/cyttsp_core.c index 1dbd849c9613..01646910c9db 100644 --- a/drivers/input/touchscreen/cyttsp_core.c +++ b/drivers/input/touchscreen/cyttsp_core.c @@ -673,7 +673,7 @@ struct cyttsp *cyttsp_probe(const struct cyttsp_bus_ops *bus_ops, ts->reset_gpio = devm_gpiod_get_optional(dev, "reset", GPIOD_OUT_LOW); if (IS_ERR(ts->reset_gpio)) { error = PTR_ERR(ts->reset_gpio); - dev_err(dev, "Failed to request reset gpio, error %d\n", error); + dev_err_probe(dev, error, "Failed to request reset gpio\n"); return ERR_PTR(error); } -- 2.25.1