Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp2202269pxb; Fri, 17 Sep 2021 04:47:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzJQG3UT61+yXhPzZhAeJberkAEzl9Yqc3kxjxQdK5EcPCkZdTOb5Vux4Qr9ozHeBRzo2G8 X-Received: by 2002:a17:906:68cb:: with SMTP id y11mr12025644ejr.70.1631879238775; Fri, 17 Sep 2021 04:47:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631879238; cv=none; d=google.com; s=arc-20160816; b=G6Yy8wEfmmAhsn9IMxVUqeg8/0dZrHZYdrXzNEf/zZQv6g2BuPd31ih4WylQbLN1/r epYATiTXwUykUusXF8EKzcc6SqiypDvso+pwP+j5wl0GpefJ96BDl1tlF1KSZjjbvIj5 BG6wMMJejtIlBTe4orUZdtKwjhmFgbX+Cpm4LZ2iddBpDavYAaybID9NGtx/ExWQ3/1A Ob47rZvg42WuXSDwypAEGfxdz8UjtO4T0056ZJ7oM1XPybdzOzuEU4J0tnl7R7eXR+o+ fFHe6PZ0d3FNPUxLR0rnMmBxZzjsDI1fz8M97xAlKCvBJv+7/8pgJrKfy16LqEG0PmY+ mCjg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=lhIapkMKxwa3IMiz5Hmen2OllKhvr+02yS5HOn4ToXA=; b=L5vp843aJ/3zt4yji6fV7g7NE0d1f/XTPsTYBrRLPNI55YsRdi7r3H8yNFo0edQkSE sAFoYm+0ZdSLeicyzfCXXwXTuDxtvI6sKVBOlvsXb3YjMMOFibIEsDpi6OXETEoPmjDv CPfeMPgL486POzqp1si1err44vwKkYzti4EGqUb3wHnthRbTpKRL+1RozauxuL1lxhFP /sX56JUfnparQOT6QnCGojQDOHfHY3FxhG5VUpAcaxR7hRRK2biguIxGYioormEpnR36 XbFJQb/ZBcJ8DWD273FBBPPf9jbi+lhac8R+ggDblIdQKlTeXJ8v/UKIRdFyBhx00zZX ta8Q== 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 g17si7005381edv.127.2021.09.17.04.46.41; Fri, 17 Sep 2021 04:47:18 -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 S242369AbhIQBgu (ORCPT + 99 others); Thu, 16 Sep 2021 21:36:50 -0400 Received: from mx22.baidu.com ([220.181.50.185]:40214 "EHLO baidu.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S235487AbhIQBgt (ORCPT ); Thu, 16 Sep 2021 21:36:49 -0400 Received: from BC-Mail-Ex14.internal.baidu.com (unknown [172.31.51.54]) by Forcepoint Email with ESMTPS id 50E32F29DCA3ED843432; Fri, 17 Sep 2021 09:35:26 +0800 (CST) Received: from BJHW-MAIL-EX27.internal.baidu.com (10.127.64.42) by BC-Mail-Ex14.internal.baidu.com (172.31.51.54) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2242.12; Fri, 17 Sep 2021 09:35:26 +0800 Received: from localhost (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; Fri, 17 Sep 2021 09:35:25 +0800 Date: Fri, 17 Sep 2021 09:35:25 +0800 From: Cai Huoqing To: Linus Walleij CC: Dmitry Torokhov , Linux Input , linux-kernel Subject: Re: [PATCH] Input: cyttsp - Make use of the helper function dev_err_probe() Message-ID: <20210917013525.GA17348@LAPTOP-UKSR4ENP.internal.baidu.com> References: <20210916153156.14098-1-caihuoqing@baidu.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) X-Originating-IP: [172.31.63.8] X-ClientProxiedBy: BJHW-Mail-Ex10.internal.baidu.com (10.127.64.33) To BJHW-MAIL-EX27.internal.baidu.com (10.127.64.42) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi thanks for your feedback. On 17 9月 21 00:30:32, Linus Walleij wrote: > Hi Cai, > > On Thu, Sep 16, 2021 at 5:32 PM Cai Huoqing wrote: > > > 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); > > In this case you're supposed to do > > return dev_err_probe(dev, error, "Failed to request reset gpio\n"); the probe function is defined: "struct cyttsp *cyttsp_probe(" so it is required to return a PTR:cyttsp *. Thanks Cai > > Yours, > Linus Walleij