lkml.org 
[lkml]   [2021]   [Oct]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v2 2/2] iio: st_lsm9ds0: Make use of the helper function dev_err_probe()
On Thu, Oct 7, 2021 at 8:26 PM Jonathan Cameron <jic23@kernel.org> wrote:
> On Wed, 29 Sep 2021 18:06:38 +0100
> Jonathan Cameron <jic23@kernel.org> wrote:
> > On Tue, 28 Sep 2021 09:40:54 +0800
> > Cai Huoqing <caihuoqing@baidu.com> wrote:
> >
> > > When possible use dev_err_probe help to properly deal with the
> > > PROBE_DEFER error, the benefit is that DEFER issue will be logged
> > > in the devices_deferred debugfs file.
> > > Using dev_err_probe() can reduce code size, and the error value
> > > gets printed.
> > >
> > > Signed-off-by: Cai Huoqing <caihuoqing@baidu.com>
>
> +CC Andy who wrote this particular driver.

Thanks, Jonathan!

> Change looks simple enough I'll apply it though and at least get 0-day building it.
>
> Applied to the togreg branch of iio.git and pushed out as testing for 0-day to
> work it's magic,

...

> > > + return dev_err_probe(dev, PTR_ERR(lsm9ds0->vdd),
> > > + "unable to get Vdd supply\n");

> > > + return dev_err_probe(dev, PTR_ERR(lsm9ds0->vdd_io),
> > > + "unable to get Vdd_IO supply\n");

I prefer seeing them as one liners, but I've no strong opinion.

--
With Best Regards,
Andy Shevchenko

\
 
 \ /
  Last update: 2021-10-07 19:31    [W:0.051 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site