aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--nvdebug_entry.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/nvdebug_entry.c b/nvdebug_entry.c
index 695b5fd..fa35fb2 100644
--- a/nvdebug_entry.c
+++ b/nvdebug_entry.c
@@ -267,14 +267,16 @@ static void __exit nvdebug_exit(void) {
267 char device_id[7]; 267 char device_id[7];
268 snprintf(device_id, 7, "gpu%d", g_nvdebug_devices); 268 snprintf(device_id, 7, "gpu%d", g_nvdebug_devices);
269 remove_proc_subtree(device_id, NULL); 269 remove_proc_subtree(device_id, NULL);
270 // Free BAR mappings 270 // Free BAR mappings for PCIe devices
271 g = &g_nvdebug_state[g_nvdebug_devices]; 271 g = &g_nvdebug_state[g_nvdebug_devices];
272 if (g && g->regs) 272 if (g && g->pcid) {
273 pci_iounmap(g->pcid, g->regs); 273 if (g && g->regs)
274 if (g && g->bar2) 274 pci_iounmap(g->pcid, g->regs);
275 pci_iounmap(g->pcid, g->bar2); 275 if (g && g->bar2)
276 // TEMP 276 pci_iounmap(g->pcid, g->bar2);
277 free_irq(g->pcid->irq, g->pcid); 277 // TEMP
278 free_irq(g->pcid->irq, g->pcid);
279 }
278 printk(KERN_INFO "[nvdebug] Chip ID %x deinitialized.", g->chip_id); 280 printk(KERN_INFO "[nvdebug] Chip ID %x deinitialized.", g->chip_id);
279 } 281 }
280 printk(KERN_INFO "[nvdebug] Module exit complete.\n"); 282 printk(KERN_INFO "[nvdebug] Module exit complete.\n");