Re: [PATCH v2 2/2] iio: st_lsm9ds0: Make use of the helper function dev_err_probe()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Oct 7, 2021 at 8:26 PM Jonathan Cameron <jic23@xxxxxxxxxx> wrote:
> On Wed, 29 Sep 2021 18:06:38 +0100
> Jonathan Cameron <jic23@xxxxxxxxxx> wrote:
> > On Tue, 28 Sep 2021 09:40:54 +0800
> > Cai Huoqing <caihuoqing@xxxxxxxxx> 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@xxxxxxxxx>
>
> +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



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux