File tree Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -106,8 +106,9 @@ static void __devexit emu_remove(struct pci_dev *pdev)
106
106
107
107
gameport_unregister_port (emu -> gameport );
108
108
release_region (emu -> io , emu -> size );
109
- pci_disable_device (pdev );
110
109
kfree (emu );
110
+
111
+ pci_disable_device (pdev );
111
112
}
112
113
113
114
static struct pci_driver emu_driver = {
Original file line number Diff line number Diff line change @@ -133,11 +133,11 @@ static void __devexit fm801_gp_remove(struct pci_dev *pci)
133
133
{
134
134
struct fm801_gp * gp = pci_get_drvdata (pci );
135
135
136
- if (gp ) {
137
- gameport_unregister_port (gp -> gameport );
138
- release_resource (gp -> res_port );
139
- kfree ( gp );
140
- }
136
+ gameport_unregister_port (gp -> gameport );
137
+ release_resource (gp -> res_port );
138
+ kfree (gp );
139
+
140
+ pci_disable_device ( pci );
141
141
}
142
142
143
143
static const struct pci_device_id fm801_gp_id_table [] = {
You can’t perform that action at this time.
0 commit comments