summaryrefslogtreecommitdiffstats
path: root/sys/dev/agp/agp_ali.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/agp/agp_ali.c')
-rw-r--r--sys/dev/agp/agp_ali.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/sys/dev/agp/agp_ali.c b/sys/dev/agp/agp_ali.c
index a619547..74bd2b1 100644
--- a/sys/dev/agp/agp_ali.c
+++ b/sys/dev/agp/agp_ali.c
@@ -141,12 +141,9 @@ static int
agp_ali_detach(device_t dev)
{
struct agp_ali_softc *sc = device_get_softc(dev);
- int error;
u_int32_t attbase;
- error = agp_generic_detach(dev);
- if (error)
- return error;
+ agp_free_cdev(dev);
/* Disable the TLB.. */
pci_write_config(dev, AGP_ALI_TLBCTRL, 0x90, 1);
@@ -157,6 +154,7 @@ agp_ali_detach(device_t dev)
pci_write_config(dev, AGP_ALI_ATTBASE, attbase & 0xfff, 4);
agp_free_gatt(sc->gatt);
+ agp_free_res(dev);
return 0;
}
OpenPOWER on IntegriCloud