[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200827184050.GB6196@kozik-lap>
Date: Thu, 27 Aug 2020 20:40:50 +0200
From: Krzysztof Kozlowski <krzk@...nel.org>
To: Andy Shevchenko <andy.shevchenko@...il.com>
Cc: Dmitry Torokhov <dmitry.torokhov@...il.com>,
Hans de Goede <hdegoede@...hat.com>,
Linus Walleij <linus.walleij@...aro.org>,
Bastien Nocera <hadess@...ess.net>,
Sangwon Jee <jeesw@...fas.com>,
Eugen Hristev <eugen.hristev@...rochip.com>,
"Gustavo A. R. Silva" <gustavoars@...nel.org>,
Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
linux-input <linux-input@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Platform Driver <platform-driver-x86@...r.kernel.org>
Subject: Re: [PATCH 06/24] Input: pwm-vibra - Simplify with dev_err_probe()
On Thu, Aug 27, 2020 at 12:06:46PM +0300, Andy Shevchenko wrote:
> On Wed, Aug 26, 2020 at 9:18 PM Krzysztof Kozlowski <krzk@...nel.org> wrote:
> >
> > Common pattern of handling deferred probe can be simplified with
> > dev_err_probe(). Less code and also it prints the error value.
>
> > err = PTR_ERR_OR_ZERO(vibrator->vcc);
> > + if (err)
> > + return dev_err_probe(&pdev->dev, err, "Failed to request regulator\n");
>
> Same comment, no need to have additional PTR_ERR_OZR_ZERO().
Yes.
Best regards,
Krzysztof
Powered by blists - more mailing lists