aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/fdt/simplebus.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/fdt/simplebus.c')
-rw-r--r--sys/dev/fdt/simplebus.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/dev/fdt/simplebus.c b/sys/dev/fdt/simplebus.c
index 37db238f2108..0f41d3433d75 100644
--- a/sys/dev/fdt/simplebus.c
+++ b/sys/dev/fdt/simplebus.c
@@ -189,12 +189,17 @@ int
simplebus_detach(device_t dev)
{
struct simplebus_softc *sc;
+ int rv;
+
+ rv = bus_generic_detach(dev);
+ if (rv != 0)
+ return (rv);
sc = device_get_softc(dev);
if (sc->ranges != NULL)
free(sc->ranges, M_DEVBUF);
- return (bus_generic_detach(dev));
+ return (0);
}
void