[PATCH 1/5] MIPS: ip22-gio: fix kfree() of static object

Johan Hovold
2026-04-24T10:28:58Z

The gio bus root device is a statically allocated object which must not
be freed by kfree() on failure to register the device or bus.

Fixes: 82242d28ff8b ("MIPS: IP22: Add missing put_device call")
Cc: stable@vger.kernel.org # 3.17
Cc: Levente Kurusa <levex@linux.com>
Signed-off-by: Johan Hovold <johan@kernel.org>
---
arch/mips/sgi-ip22/ip22-gio.c | 1 -
1 file changed, 1 deletion(-)

diff --git a/arch/mips/sgi-ip22/ip22-gio.c b/arch/mips/sgi-ip22/ip22-gio.c
index 9eec8842ffb7..a574441fa44b 100644
--- a/arch/mips/sgi-ip22/ip22-gio.c
+++ b/arch/mips/sgi-ip22/ip22-gio.c
@@ -30,7 +30,6 @@ static struct {

static void gio_bus_release(struct device *dev)
{
- kfree(dev);
}

static struct device gio_bus = {
--
2.53.0