summaryrefslogtreecommitdiffstats
path: root/sys/dev/agp/agp_amd64.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/agp/agp_amd64.c')
-rw-r--r--sys/dev/agp/agp_amd64.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/agp/agp_amd64.c b/sys/dev/agp/agp_amd64.c
index 9e5b6e2..7c1a25d 100644
--- a/sys/dev/agp/agp_amd64.c
+++ b/sys/dev/agp/agp_amd64.c
@@ -250,10 +250,9 @@ static int
agp_amd64_detach(device_t dev)
{
struct agp_amd64_softc *sc = device_get_softc(dev);
- int i, error;
+ int i;
- if ((error = agp_generic_detach(dev)))
- return (error);
+ agp_free_cdev(dev);
for (i = 0; i < sc->n_mctrl; i++)
pci_cfgregwrite(0, sc->mctrl[i], 3, AGP_AMD64_APCTRL,
@@ -262,6 +261,7 @@ agp_amd64_detach(device_t dev)
AGP_SET_APERTURE(dev, sc->initial_aperture);
agp_free_gatt(sc->gatt);
+ agp_free_res(dev);
return (0);
}
OpenPOWER on IntegriCloud