lkml.org 
[lkml]   [2021]   [Apr]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v6 2/4] leds: Add driver for Qualcomm LPG
On Thu 29 Apr 14:31 CDT 2021, Marijn Suijten wrote:

> On 4/29/21 12:39 AM, Bjorn Andersson wrote:
> > On Sun 18 Apr 16:54 CDT 2021, Marijn Suijten wrote:
[..]
> > > > + ret = lpg_init_lut(lpg);
> > > > + if (ret < 0)
> > > > + return ret;
> > >
> > >
> > > How about turning these returns into dev_err_probe? I'm not sure if that's
> > > the expected way to go nowadays, but having some form of logging when a
> > > driver fails to probe is always good to have.
> > >
> >
> > The intention is that each code path through these functions will either
> > pass or spit out an error in the log. I looked through them again and
> > think I cover all paths...
>
>
> That is true, all the errors not covered are extremely unlikely like
> -ENOMEM. I vaguely recall having to insert extra logging to get through
> initial probe, but that might have been something inside lpg_add_led as
> well. Fine to leave this as it is.
>

When kzalloc et al returns -ENOMEM it will be done with an error print,
so that does not need an additional print. That said, another pass
through lpg_add_led() made me spot that if you get a parse error on
the "color" property we would silently return -EINVAL. I've corrected
this.

Thanks,
Bjorn

\
 
 \ /
  Last update: 2021-04-29 22:55    [W:0.037 / U:3.480 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site