summaryrefslogtreecommitdiffstats
path: root/sys/dev/agp/agp_via.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/agp/agp_via.c')
-rw-r--r--sys/dev/agp/agp_via.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/sys/dev/agp/agp_via.c b/sys/dev/agp/agp_via.c
index aa6d640..d60f49a 100644
--- a/sys/dev/agp/agp_via.c
+++ b/sys/dev/agp/agp_via.c
@@ -240,16 +240,14 @@ static int
agp_via_detach(device_t dev)
{
struct agp_via_softc *sc = device_get_softc(dev);
- int error;
- error = agp_generic_detach(dev);
- if (error)
- return error;
+ agp_free_cdev(dev);
pci_write_config(dev, sc->regs[REG_GARTCTRL], 0, 4);
pci_write_config(dev, sc->regs[REG_ATTBASE], 0, 4);
AGP_SET_APERTURE(dev, sc->initial_aperture);
agp_free_gatt(sc->gatt);
+ agp_free_res(dev);
return 0;
}
OpenPOWER on IntegriCloud