linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Linus Walleij <linus.walleij@linaro.org>
To: Cai Huoqing <caihuoqing@baidu.com>
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 00:30:32 +0200	[thread overview]
Message-ID: <CACRpkdau6wCjmeQeFuadsyhi_XZQ6AATYw1okSBMOYbCoGkmCA@mail.gmail.com> (raw)
In-Reply-To: <20210916153156.14098-1-caihuoqing@baidu.com>

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");

Yours,
Linus Walleij

  reply	other threads:[~2021-09-16 22:30 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 [this message]
2021-09-17  1:35   ` Cai Huoqing
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=CACRpkdau6wCjmeQeFuadsyhi_XZQ6AATYw1okSBMOYbCoGkmCA@mail.gmail.com \
    --to=linus.walleij@linaro.org \
    --cc=caihuoqing@baidu.com \
    --cc=dmitry.torokhov@gmail.com \
    --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).