diff options
author | kz151634 <none@none> | 2006-11-13 22:04:21 -0800 |
---|---|---|
committer | kz151634 <none@none> | 2006-11-13 22:04:21 -0800 |
commit | 3f3352a7fd2e6d10918e1bbe3d8ccdfa9c86cce6 (patch) | |
tree | 677e31ec90e91a9f639e862c32c7450e7c133024 /usr/src | |
parent | 415e5120fdbacf132d1845300d92a6cd74eed2fa (diff) | |
download | illumos-gate-3f3352a7fd2e6d10918e1bbe3d8ccdfa9c86cce6.tar.gz |
6487609 vgatext_get_pci_reg_index failing to find a reg entry leads to panic in i915_sun_attachonnv_53
Diffstat (limited to 'usr/src')
-rw-r--r-- | usr/src/uts/i86pc/io/drm/i915_sundrv.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/usr/src/uts/i86pc/io/drm/i915_sundrv.c b/usr/src/uts/i86pc/io/drm/i915_sundrv.c index 4fa262989c..f588bd0a3c 100644 --- a/usr/src/uts/i86pc/io/drm/i915_sundrv.c +++ b/usr/src/uts/i86pc/io/drm/i915_sundrv.c @@ -341,12 +341,14 @@ i915_sun_detach(dev_info_t *devi, ddi_detach_cmd_t cmd) if (softc->agp_master != NULL) agpmaster_detach(&softc->agp_master); - /* free PCI config access handle */ - pci_config_teardown(softc->pci_cfg_hdlp); + if (softc->pci_cfg_hdlp) { + /* free PCI config access handle */ + pci_config_teardown(softc->pci_cfg_hdlp); - /* free PCI configuration handle */ - kmem_free((void *)softc->pci_cfg_hdlp, - (sizeof (ddi_acc_handle_t))); + /* free PCI configuration handle */ + kmem_free((void *)softc->pci_cfg_hdlp, + (sizeof (ddi_acc_handle_t))); + } /* graphics misc module detach */ (void) gfxp_vgatext_detach(devi, DDI_DETACH, softc->ds_gfx); |