lkml.org 
[lkml]   [2023]   [Apr]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/4] ASoC: codecs: wcd934x: Simplify with dev_err_probe
On Mon, Apr 17, 2023 at 05:43:03PM +0200, Krzysztof Kozlowski wrote:
> On 17/04/2023 17:33, Mark Brown wrote:
> > On Mon, Apr 17, 2023 at 04:14:51PM +0200, Krzysztof Kozlowski wrote:

> >> - if (IS_ERR(wcd->if_regmap)) {
> >> - dev_err(dev, "Failed to allocate ifc register map\n");
> >> - return PTR_ERR(wcd->if_regmap);
> >> - }
> >> + if (IS_ERR(wcd->if_regmap))
> >> + return dev_err_probe(dev, PTR_ERR(wcd->if_regmap),
> >> + "Failed to allocate ifc register map\n");

> > This is a functional change.

> Hmm... I don't see it. Return value is the same, same message is
> printed, same condition. Did I make some copy-paste error?

You've replaced an unconditional dev_err() with dev_err_probe().
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2023-04-17 17:59    [W:0.053 / U:0.424 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site