AudioDxe: Fix NULL check
@@ -383,7 +383,7 @@ HdaControllerScanCodecs (
DEBUG ((DEBUG_VERBOSE, "HdaControllerScanCodecs(): start\n"));
EFI_STATUS Status;
- EFI_PCI_IO_PROTOCOL *PciIo = HdaControllerDev->PciIo;
+ EFI_PCI_IO_PROTOCOL *PciIo;
UINT16 HdaStatests;
EFI_HDA_IO_VERB_LIST HdaCodecVerbList;
UINT32 VendorVerb;
@@ -399,6 +399,8 @@ HdaControllerScanCodecs (
return EFI_INVALID_PARAMETER;
}
+ PciIo = HdaControllerDev->PciIo;
+
//
// Get STATESTS register.
//
