FAILED: patch "[PATCH] iio: admv1013: initialize callback mutex before registering" failed to apply to 6.6-stable tree
[email protected]
maintainerThe patch below does not apply to the 6.6-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.
To reproduce the conflict and resubmit, you may use the following commands:
git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-6.6.y
git checkout FETCH_HEAD
git cherry-pick -x baf7e43b7fb5afb777353bf265ddf9d909f72b9f
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<[email protected]>' --in-reply-to '2026100645-snide-neatness-caed@gregkh' --subject-prefix 'PATCH 6.6.y' 'HEAD^..'
Possible dependencies:
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From baf7e43b7fb5afb777353bf265ddf9d909f72b9f Mon Sep 17 00:00:00 2001
From: Runyu Xiao <[email protected]>
Date: Wed, 19 Aug 2026 22:17:51 +0800
Subject: [PATCH] iio: admv1013: initialize callback mutex before registering
notifier
admv1013_probe() registers a clock notifier whose callback takes st->lock on POST_RATE_CHANGE. Initialize the mutex before devm_clk_notifier_register() so the callback cannot observe an uninitialized lock during probe.
Use devm_mutex_init() so the lock lifetime is tied to the device and cleanup stays paired with the rest of the managed probe resources.
drivers/iio/frequency/admv1013.c +5 -2
@@ -601,11 +601,14 @@ static int admv1013_probe(struct spi_device *spi) "failed to get the LO input clock\n"); st->nb.notifier_call = admv1013_freq_change; - ret =devm_clk_notifier_register (dev, st->clkin, &st->nb); + + ret =devm_mutex_init (dev, &st->lock);if (ret)return ret; -mutex_init (&st->lock); + ret =devm_clk_notifier_register (dev, st->clkin, &st->nb); +if (ret) +return ret; ret =admv1013_init (st, vcm_uv);if (ret)