From: Andy Shevchenko <andriy.shevchenko@intel.com>
To: "Nuno Sá" <noname.nuno@gmail.com>
Cc: "Felix Gu" <ustc.gu@gmail.com>,
"Ariana Lazar" <ariana.lazar@microchip.com>,
"Jonathan Cameron" <jic23@kernel.org>,
"David Lechner" <dlechner@baylibre.com>,
"Nuno Sá" <nuno.sa@analog.com>,
"Andy Shevchenko" <andy@kernel.org>,
"Jonathan Cameron" <Jonathan.Cameron@huawei.com>,
linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] iio: dac: mcp47feb02: Fix mutex used before initialization
Date: Mon, 23 Feb 2026 13:36:37 +0200 [thread overview]
Message-ID: <aZw7xdFd2GE10u0B@smile.fi.intel.com> (raw)
In-Reply-To: <0ae976f070b0bf5a13ba5985b8e7d0f1efbb2cfd.camel@gmail.com>
On Mon, Feb 23, 2026 at 11:13:33AM +0000, Nuno Sá wrote:
> On Mon, 2026-02-23 at 16:03 +0800, Felix Gu wrote:
> > The mcp47feb02_parse_fw() function uses data->lock, but the mutex was
> > initialized after this function in probe path.
> Actually I think the better fix is to not lock at all? Why do we need a lock around
> mcp47feb02_parse_fw() if it's only called from probe()?
+1! The lock should be called when it's required. Any explanations from the Git
history on it?
--
With Best Regards,
Andy Shevchenko
prev parent reply other threads:[~2026-02-23 11:36 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-23 8:03 [PATCH] iio: dac: mcp47feb02: Fix mutex used before initialization Felix Gu
2026-02-23 8:52 ` Andy Shevchenko
2026-02-23 9:22 ` Felix Gu
2026-02-23 11:13 ` Nuno Sá
2026-02-23 11:36 ` Andy Shevchenko [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=aZw7xdFd2GE10u0B@smile.fi.intel.com \
--to=andriy.shevchenko@intel.com \
--cc=Jonathan.Cameron@huawei.com \
--cc=andy@kernel.org \
--cc=ariana.lazar@microchip.com \
--cc=dlechner@baylibre.com \
--cc=jic23@kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=noname.nuno@gmail.com \
--cc=nuno.sa@analog.com \
--cc=ustc.gu@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