]> git.ipfire.org Git - thirdparty/ipxe.git/commitdiff
[efi] Fix order of events on SNP removal path
authorMichael Brown <mcb30@ipxe.org>
Tue, 1 Sep 2015 20:22:39 +0000 (21:22 +0100)
committerMichael Brown <mcb30@ipxe.org>
Tue, 1 Sep 2015 20:24:02 +0000 (21:24 +0100)
Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/interface/efi/efi_snp.c

index b7debe7b02542c019d6b898ae1a792fe9744e85c..6712384913e38b29ac8c3cf8c82ad9ab8e30e441 100644 (file)
@@ -1101,6 +1101,7 @@ static int efi_snp_probe ( struct net_device *netdev ) {
               snpdev, netdev->name, efi_handle_name ( snpdev->handle ) );
        return 0;
 
+       list_del ( &snpdev->list );
        if ( snpdev->package_list )
                efi_snp_hii_uninstall ( snpdev );
        efi_child_del ( efidev->device, snpdev->handle );
@@ -1172,10 +1173,10 @@ static void efi_snp_remove ( struct net_device *netdev ) {
        }
 
        /* Uninstall the SNP */
+       list_del ( &snpdev->list );
        if ( snpdev->package_list )
                efi_snp_hii_uninstall ( snpdev );
        efi_child_del ( snpdev->efidev->device, snpdev->handle );
-       list_del ( &snpdev->list );
        bs->UninstallMultipleProtocolInterfaces (
                        snpdev->handle,
                        &efi_simple_network_protocol_guid, &snpdev->snp,