Browse Source

[efi] Fix order of events on SNP removal path

Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Michael Brown 9 years ago
parent
commit
226d5f2caf
1 changed files with 2 additions and 1 deletions
  1. 2
    1
      src/interface/efi/efi_snp.c

+ 2
- 1
src/interface/efi/efi_snp.c View File

@@ -1101,6 +1101,7 @@ static int efi_snp_probe ( struct net_device *netdev ) {
1101 1101
 	       snpdev, netdev->name, efi_handle_name ( snpdev->handle ) );
1102 1102
 	return 0;
1103 1103
 
1104
+	list_del ( &snpdev->list );
1104 1105
 	if ( snpdev->package_list )
1105 1106
 		efi_snp_hii_uninstall ( snpdev );
1106 1107
 	efi_child_del ( efidev->device, snpdev->handle );
@@ -1172,10 +1173,10 @@ static void efi_snp_remove ( struct net_device *netdev ) {
1172 1173
 	}
1173 1174
 
1174 1175
 	/* Uninstall the SNP */
1176
+	list_del ( &snpdev->list );
1175 1177
 	if ( snpdev->package_list )
1176 1178
 		efi_snp_hii_uninstall ( snpdev );
1177 1179
 	efi_child_del ( snpdev->efidev->device, snpdev->handle );
1178
-	list_del ( &snpdev->list );
1179 1180
 	bs->UninstallMultipleProtocolInterfaces (
1180 1181
 			snpdev->handle,
1181 1182
 			&efi_simple_network_protocol_guid, &snpdev->snp,

Loading…
Cancel
Save