public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH] SourceLevelDebugPkg DebugUsb3: Check mUsb3Instance before dereferencing it
@ 2018-02-09  2:45 Star Zeng
  2018-02-09  2:54 ` Wu, Hao A
  0 siblings, 1 reply; 2+ messages in thread
From: Star Zeng @ 2018-02-09  2:45 UTC (permalink / raw)
  To: edk2-devel; +Cc: Star Zeng, Ruiyu Ni, Hao Wu

Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Hao Wu <hao.a.wu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Star Zeng <star.zeng@intel.com>
---
 .../Library/DebugCommunicationLibUsb3/DebugCommunicationLibUsb3Dxe.c    | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/SourceLevelDebugPkg/Library/DebugCommunicationLibUsb3/DebugCommunicationLibUsb3Dxe.c b/SourceLevelDebugPkg/Library/DebugCommunicationLibUsb3/DebugCommunicationLibUsb3Dxe.c
index 1582b9a8d6de..29cec56f39dc 100644
--- a/SourceLevelDebugPkg/Library/DebugCommunicationLibUsb3/DebugCommunicationLibUsb3Dxe.c
+++ b/SourceLevelDebugPkg/Library/DebugCommunicationLibUsb3/DebugCommunicationLibUsb3Dxe.c
@@ -443,7 +443,7 @@ DebugCommunicationUsb3DxeConstructor (
   }
 
 Done:
-  if (mUsb3Instance->Ready && (mUsb3Instance->PciIoEvent == 0)) {
+  if ((mUsb3Instance != NULL) && mUsb3Instance->Ready && (mUsb3Instance->PciIoEvent == 0)) {
     Status = Usb3NamedEventListen (
                &gEfiPciIoProtocolGuid,
                TPL_NOTIFY,
-- 
2.7.0.windows.1



^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-02-09  2:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-02-09  2:45 [PATCH] SourceLevelDebugPkg DebugUsb3: Check mUsb3Instance before dereferencing it Star Zeng
2018-02-09  2:54 ` Wu, Hao A

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox