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

* Re: [PATCH] SourceLevelDebugPkg DebugUsb3: Check mUsb3Instance before dereferencing it
  2018-02-09  2:45 [PATCH] SourceLevelDebugPkg DebugUsb3: Check mUsb3Instance before dereferencing it Star Zeng
@ 2018-02-09  2:54 ` Wu, Hao A
  0 siblings, 0 replies; 2+ messages in thread
From: Wu, Hao A @ 2018-02-09  2:54 UTC (permalink / raw)
  To: Zeng, Star, edk2-devel@lists.01.org; +Cc: Ni, Ruiyu, Zeng, Star

Reviewed-by: Hao Wu <hao.a.wu@intel.com>

Best Regards,
Hao Wu


> -----Original Message-----
> From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Star
> Zeng
> Sent: Friday, February 09, 2018 10:45 AM
> To: edk2-devel@lists.01.org
> Cc: Ni, Ruiyu; Wu, Hao A; Zeng, Star
> Subject: [edk2] [PATCH] SourceLevelDebugPkg DebugUsb3: Check
> mUsb3Instance before dereferencing it
> 
> 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/DebugCommun
> icationLibUsb3Dxe.c
> b/SourceLevelDebugPkg/Library/DebugCommunicationLibUsb3/DebugCommun
> icationLibUsb3Dxe.c
> index 1582b9a8d6de..29cec56f39dc 100644
> ---
> a/SourceLevelDebugPkg/Library/DebugCommunicationLibUsb3/DebugCommun
> icationLibUsb3Dxe.c
> +++
> b/SourceLevelDebugPkg/Library/DebugCommunicationLibUsb3/DebugCommun
> icationLibUsb3Dxe.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
> 
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel


^ permalink raw reply	[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