git: 0cedb626959c - main - iichid(4): Always release interrupt resource
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 26 Jun 2026 18:59:59 UTC
The branch main has been updated by obiwac:
URL: https://cgit.FreeBSD.org/src/commit/?id=0cedb626959c0bbab6497d1f042beddab059bdaa
commit 0cedb626959c0bbab6497d1f042beddab059bdaa
Author: Aymeric Wibo <obiwac@FreeBSD.org>
AuthorDate: 2026-06-26 18:52:25 +0000
Commit: Aymeric Wibo <obiwac@FreeBSD.org>
CommitDate: 2026-06-26 18:52:28 +0000
iichid(4): Always release interrupt resource
Reviewed by: aokblast
Event: Halifax Hackathon 202606
Location: Chair
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D57886
---
sys/dev/iicbus/iichid.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/sys/dev/iicbus/iichid.c b/sys/dev/iicbus/iichid.c
index 430066bd8f52..d13520017e93 100644
--- a/sys/dev/iicbus/iichid.c
+++ b/sys/dev/iicbus/iichid.c
@@ -1163,15 +1163,15 @@ iichid_attach(device_t dev)
}
if (sc->irq_res == NULL || error != 0) {
+ device_printf(sc->dev, "Interrupt setup failed\n");
+ if (sc->irq_res != NULL)
+ bus_release_resource(dev, SYS_RES_IRQ, sc->irq_rid,
+ sc->irq_res);
#ifdef IICHID_SAMPLING
device_printf(sc->dev,
"Using sampling mode\n");
sc->sampling_rate_slow = IICHID_SAMPLING_RATE_SLOW;
#else
- device_printf(sc->dev, "Interrupt setup failed\n");
- if (sc->irq_res != NULL)
- bus_release_resource(dev, SYS_RES_IRQ, sc->irq_rid,
- sc->irq_res);
iichid_detach(dev);
error = ENXIO;
goto done;