aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/iicbus/gpio/pcf8574.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/iicbus/gpio/pcf8574.c')
-rw-r--r--sys/dev/iicbus/gpio/pcf8574.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/sys/dev/iicbus/gpio/pcf8574.c b/sys/dev/iicbus/gpio/pcf8574.c
index 86c78ffb15e6..bf60dec67557 100644
--- a/sys/dev/iicbus/gpio/pcf8574.c
+++ b/sys/dev/iicbus/gpio/pcf8574.c
@@ -159,9 +159,7 @@ pcf8574_detach(device_t dev)
sc = device_get_softc(dev);
- if (sc->busdev != NULL)
- gpiobus_detach_bus(sc->busdev);
-
+ gpiobus_detach_bus(dev);
sx_destroy(&sc->lock);
return (0);
}