The branch stable/14 has been updated by avg: URL: https://cgit.FreeBSD.org/src/commit/?id=b4e40a47d37939713196a2530b4759a7a8e11148
commit b4e40a47d37939713196a2530b4759a7a8e11148 Author: Andriy Gapon <a...@freebsd.org> AuthorDate: 2025-03-30 19:47:50 +0000 Commit: Andriy Gapon <a...@freebsd.org> CommitDate: 2025-06-27 07:37:55 +0000 ads111x: initialize the lock earlier, before it's used The first use can be in ads111x_add_channels. (cherry picked from commit eda3a7ac755c5e02f92ff971db63d0a702963d66) --- sys/dev/iicbus/adc/ads111x.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/iicbus/adc/ads111x.c b/sys/dev/iicbus/adc/ads111x.c index dd223f69bb5f..21924627cc68 100644 --- a/sys/dev/iicbus/adc/ads111x.c +++ b/sys/dev/iicbus/adc/ads111x.c @@ -559,6 +559,8 @@ ads111x_attach(device_t dev) return (err); } + sx_init(&sc->lock, "ads111x"); + /* Add the sysctl handler to set the chip configuration register. */ ctx = device_get_sysctl_ctx(dev); tree = device_get_sysctl_tree(dev); @@ -575,8 +577,6 @@ ads111x_attach(device_t dev) /* Set up channels based on metadata or default config. */ ads111x_add_channels(sc); - sx_init(&sc->lock, "ads111x"); - return (0); }