lkml.org 
[lkml]   [2023]   [Jan]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH net-next 2/2] net: mdio: add amlogic gxl mdio mux support
On Wed, Jan 18, 2023 at 03:56:32AM +0100, Andrew Lunn wrote:
> > > >> + priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
> > > >> + if (!priv)
> > > >> + return -ENOMEM;
> > > >
> > > > nit: may be it is nicer to use dev_err_probe() here for consistency.
> > >
> > > That was on purpose. I only use the `dev_err_probe()` when the probe may
> > > defer, which I don't expect here.
> > >
> > > I don't mind changing if you prefer it this way.
> >
> > I have no strong opinion on this :)
>
> dev_err_probe() does not apply here, because devm_kzalloc does not
> return an error code. Hence it cannot be EPROBE_DEFFER, which is what
> dev_err_probe() is looking for.

Sure, there is no EPROBE_DEFFER.

But, FWIIW, my reading of the documentation for dev_err_probe()
is that it's use in such cases is acceptable.

Anyway, let's pass on my suggestion.

\
 
 \ /
  Last update: 2023-03-26 23:45    [W:0.149 / U:0.396 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site