From: Jonathan Cameron <jic23@kernel.org>
To: Andy Shevchenko <andriy.shevchenko@intel.com>
Cc: "Joshua Crofts" <joshua.crofts1@gmail.com>,
"Salah Triki" <salah.triki@gmail.com>,
"David Lechner" <dlechner@baylibre.com>,
"Nuno Sá" <nuno.sa@analog.com>,
"Andy Shevchenko" <andy@kernel.org>,
linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] iio: temperature: tsys02d: Fix state desynchronization on resolution write error
Date: Sun, 13 Sep 2026 23:10:49 +0100 [thread overview]
Message-ID: <20260913231049.5e09a355@jic23-hlaptop> (raw)
In-Reply-To: <ap_kTDGgJq1S8rVr@ashevche-desk.local>
On Tue, 8 Sep 2026 13:32:44 +0300
Andy Shevchenko <andriy.shevchenko@intel.com> wrote:
> On Mon, Sep 07, 2026 at 04:50:09PM +0200, Joshua Crofts wrote:
> > On Mon, 7 Sep 2026 09:53:53 +0100
> > Salah Triki <salah.triki@gmail.com> wrote:
>
> ...
>
> > > ret = ms_sensors_write_resolution(dev_data, i);
> > > + if (!ret)
> > > + dev_data->res_index = i;
> >
> > + blank line
> >
> > > mutex_unlock(&dev_data->lock);
> > >
> > > return ret;
> >
> > Reviewed-by: Joshua Crofts <joshua.crofts1@gmail.com>
>
> Actually we prefer usual pattern — "check for error first".
> This 'if (!ret)' is confusing.
>
I'd use a guard so we can just return when the error is seen.
prev parent reply other threads:[~2026-09-13 22:10 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-07 8:53 Salah Triki
2026-09-07 14:50 ` Joshua Crofts
2026-09-08 10:32 ` Andy Shevchenko
2026-09-13 22:10 ` Jonathan Cameron [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260913231049.5e09a355@jic23-hlaptop \
--to=jic23@kernel.org \
--cc=andriy.shevchenko@intel.com \
--cc=andy@kernel.org \
--cc=dlechner@baylibre.com \
--cc=joshua.crofts1@gmail.com \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nuno.sa@analog.com \
--cc=salah.triki@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®