[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAHp75VfiV26WhXL20uyOiKJU5J=eB5PnQkV48=tDZ5xda9MvJQ@mail.gmail.com>
Date: Thu, 7 Oct 2021 20:30:08 +0300
From: Andy Shevchenko <andy.shevchenko@...il.com>
To: Jonathan Cameron <jic23@...nel.org>
Cc: Cai Huoqing <caihuoqing@...du.com>,
Lars-Peter Clausen <lars@...afoo.de>,
linux-iio <linux-iio@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [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@...nel.org> wrote:
> On Wed, 29 Sep 2021 18:06:38 +0100
> Jonathan Cameron <jic23@...nel.org> wrote:
> > On Tue, 28 Sep 2021 09:40:54 +0800
> > Cai Huoqing <caihuoqing@...du.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@...du.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
Powered by blists - more mailing lists