|
@@ -1037,6 +1037,11 @@ static int nii_start ( struct efi_device *efidev ) {
|
1037
|
1037
|
|
1038
|
1038
|
/* Locate UNDI and entry point */
|
1039
|
1039
|
nii->undi = ( ( void * ) ( intptr_t ) nii->nii->Id );
|
|
1040
|
+ if ( ! nii->undi ) {
|
|
1041
|
+ DBGC ( nii, "NII %s has no UNDI\n", nii->dev.name );
|
|
1042
|
+ rc = -ENODEV;
|
|
1043
|
+ goto err_no_undi;
|
|
1044
|
+ }
|
1040
|
1045
|
if ( nii->undi->Implementation & PXE_ROMID_IMP_HW_UNDI ) {
|
1041
|
1046
|
DBGC ( nii, "NII %s is a mythical hardware UNDI\n",
|
1042
|
1047
|
nii->dev.name );
|
|
@@ -1085,6 +1090,7 @@ static int nii_start ( struct efi_device *efidev ) {
|
1085
|
1090
|
nii_pci_close ( nii );
|
1086
|
1091
|
err_pci_open:
|
1087
|
1092
|
err_hw_undi:
|
|
1093
|
+ err_no_undi:
|
1088
|
1094
|
bs->CloseProtocol ( device, &efi_nii31_protocol_guid,
|
1089
|
1095
|
efi_image_handle, device );
|
1090
|
1096
|
err_open_protocol:
|