diff options
author | Ignat Korchagin | 2019-01-04 20:20:28 +0100 |
---|---|---|
committer | Michael Brown | 2019-01-15 15:01:17 +0100 |
commit | e226fecd1b602ece7f4f208042f3e87ca540b297 (patch) | |
tree | 6600bbb6a34906661d593654dba6a5116652eb67 /src | |
parent | [pci] Correct invalid base-class/sub-class/prog-if order in PCIR (diff) | |
download | ipxe-e226fecd1b602ece7f4f208042f3e87ca540b297.tar.gz ipxe-e226fecd1b602ece7f4f208042f3e87ca540b297.tar.xz ipxe-e226fecd1b602ece7f4f208042f3e87ca540b297.zip |
[efi] Fix error handling path in efi_snp_probe
Current (simplified):
1. InstallMultipleProtocolInterfaces
if err goto err_install_protocol_interface;
2. OpenProtocol(efi_nii_protocol_guid)
if err goto err_open_nii;
3. OpenProtocol(efi_nii31_protocol_guid)
if err goto err_open_nii31;
4. efi_child_add
if err goto err_efi_child_add;
...
err_efi_child_add:
CloseProtocol(efi_nii_protocol_guid) <= should be efi_nii31_protocol_guid
err_open_nii: <= should be err_open_nii31
CloseProtocol(efi_nii31_protocol_guid) <= should be efi_nii_protocol_guid
err_open_nii31: <= should be err_open_nii
UninstallMultipleProtocolInterfaces
Signed-off-by: Ignat Korchagin <ignat@cloudflare.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src')
-rw-r--r-- | src/interface/efi/efi_snp.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/interface/efi/efi_snp.c b/src/interface/efi/efi_snp.c index 9c1b14d8..d648700f 100644 --- a/src/interface/efi/efi_snp.c +++ b/src/interface/efi/efi_snp.c @@ -1829,12 +1829,12 @@ static int efi_snp_probe ( struct net_device *netdev ) { efi_snp_hii_uninstall ( snpdev ); efi_child_del ( efidev->device, snpdev->handle ); err_efi_child_add: - bs->CloseProtocol ( snpdev->handle, &efi_nii_protocol_guid, - efi_image_handle, snpdev->handle ); - err_open_nii: bs->CloseProtocol ( snpdev->handle, &efi_nii31_protocol_guid, efi_image_handle, snpdev->handle ); err_open_nii31: + bs->CloseProtocol ( snpdev->handle, &efi_nii_protocol_guid, + efi_image_handle, snpdev->handle ); + err_open_nii: bs->UninstallMultipleProtocolInterfaces ( snpdev->handle, &efi_simple_network_protocol_guid, &snpdev->snp, |