linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Cai Huoqing <caihuoqing@baidu.com>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>,
	Linux Input <linux-input@vger.kernel.org>,
	linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] Input: cyttsp - Make use of the helper function dev_err_probe()
Date: Fri, 17 Sep 2021 09:35:25 +0800	[thread overview]
Message-ID: <20210917013525.GA17348@LAPTOP-UKSR4ENP.internal.baidu.com> (raw)
In-Reply-To: <CACRpkdau6wCjmeQeFuadsyhi_XZQ6AATYw1okSBMOYbCoGkmCA@mail.gmail.com>

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 <caihuoqing@baidu.com> 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



  reply	other threads:[~2021-09-17  1:35 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-16 15:31 [PATCH] Input: cyttsp - Make use of the helper function dev_err_probe() Cai Huoqing
2021-09-16 22:30 ` Linus Walleij
2021-09-17  1:35   ` Cai Huoqing [this message]
2021-09-19 19:28     ` Linus Walleij

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210917013525.GA17348@LAPTOP-UKSR4ENP.internal.baidu.com \
    --to=caihuoqing@baidu.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).