Skip to content

Commit

Permalink
Fix kernel panic on device removal
Browse files Browse the repository at this point in the history
  • Loading branch information
My Name committed Jul 23, 2024
1 parent f91ad1a commit e8480d5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions data_gpu/driver/src/data_gpu_top.c
Original file line number Diff line number Diff line change
Expand Up @@ -310,12 +310,12 @@ void DataGpu_Remove(struct pci_dev *pcidev) {
/* Decrement the global count of DMA devices. */
gDmaDevCount--;

/* Disable the PCI device to prevent further access. */
pci_disable_device(pcidev);

/* Clean up DMA resources specific to this device. */
Dma_Clean(dev);

/* Disable the PCI device to prevent further access. */
pci_disable_device(pcidev);

/* Log the successful removal of the device. */
pr_info("%s: Remove: Driver is unloaded.\n", MOD_NAME);
}
Expand Down

0 comments on commit e8480d5

Please sign in to comment.