git: 2af2ec524957 - main - jh7110_gpio: remove unneeded cleanup

From: Mitchell Horne <mhorne_at_FreeBSD.org>
Date: Fri, 21 Aug 2026 16:55:34 UTC
The branch main has been updated by mhorne:

URL: https://cgit.FreeBSD.org/src/commit/?id=2af2ec524957754ff356daea5fa7ee4990c1c3ea

commit 2af2ec524957754ff356daea5fa7ee4990c1c3ea
Author:     Mitchell Horne <mhorne@FreeBSD.org>
AuthorDate: 2025-08-10 17:16:11 +0000
Commit:     Mitchell Horne <mhorne@FreeBSD.org>
CommitDate: 2026-08-21 16:55:24 +0000

    jh7110_gpio: remove unneeded cleanup
    
    Any failure within bus_alloc_resources() will call bus_release_resources();
    thus the call is redundant here.
    
    MFC after:      3 days
    Sponsored by:   The FreeBSD Foundation
---
 sys/riscv/starfive/jh7110_gpio.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/sys/riscv/starfive/jh7110_gpio.c b/sys/riscv/starfive/jh7110_gpio.c
index 96b2cef43a4c..93de49e79ace 100644
--- a/sys/riscv/starfive/jh7110_gpio.c
+++ b/sys/riscv/starfive/jh7110_gpio.c
@@ -295,7 +295,6 @@ jh7110_gpio_attach(device_t dev)
 
 	if (bus_alloc_resources(dev, jh7110_gpio_spec, &sc->res) != 0) {
 		device_printf(dev, "Could not allocate resources\n");
-		bus_release_resources(dev, jh7110_gpio_spec, &sc->res);
 		mtx_destroy(&sc->mtx);
 		return (ENXIO);
 	}