From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=134.134.136.65; helo=mga03.intel.com; envelope-from=hao.a.wu@intel.com; receiver=edk2-devel@lists.01.org Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id ED1FB22361E5D for ; Thu, 8 Feb 2018 18:48:50 -0800 (PST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 08 Feb 2018 18:54:36 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,481,1511856000"; d="scan'208";a="29370948" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by fmsmga001.fm.intel.com with ESMTP; 08 Feb 2018 18:54:34 -0800 Received: from FMSMSX110.amr.corp.intel.com (10.18.116.10) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.319.2; Thu, 8 Feb 2018 18:54:35 -0800 Received: from shsmsx102.ccr.corp.intel.com (10.239.4.154) by fmsmsx110.amr.corp.intel.com (10.18.116.10) with Microsoft SMTP Server (TLS) id 14.3.319.2; Thu, 8 Feb 2018 18:54:35 -0800 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.125]) by shsmsx102.ccr.corp.intel.com ([169.254.2.124]) with mapi id 14.03.0319.002; Fri, 9 Feb 2018 10:54:33 +0800 From: "Wu, Hao A" To: "Zeng, Star" , "edk2-devel@lists.01.org" CC: "Ni, Ruiyu" , "Zeng, Star" Thread-Topic: [edk2] [PATCH] SourceLevelDebugPkg DebugUsb3: Check mUsb3Instance before dereferencing it Thread-Index: AQHToVAMkTqD8XRa1kujtJrJbMNAe6ObX/hQ Date: Fri, 9 Feb 2018 02:54:33 +0000 Message-ID: References: <1518144314-18356-1-git-send-email-star.zeng@intel.com> In-Reply-To: <1518144314-18356-1-git-send-email-star.zeng@intel.com> Accept-Language: zh-CN, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [PATCH] SourceLevelDebugPkg DebugUsb3: Check mUsb3Instance before dereferencing it X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Feb 2018 02:48:51 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Hao Wu Best Regards, Hao Wu > -----Original Message----- > From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of St= ar > 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 >=20 > Cc: Ruiyu Ni > Cc: Hao Wu > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Star Zeng > --- > .../Library/DebugCommunicationLibUsb3/DebugCommunicationLibUsb3Dxe.c > | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >=20 > 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 ( > } >=20 > Done: > - if (mUsb3Instance->Ready && (mUsb3Instance->PciIoEvent =3D=3D 0)) { > + if ((mUsb3Instance !=3D NULL) && mUsb3Instance->Ready && (mUsb3Instanc= e- > >PciIoEvent =3D=3D 0)) { > Status =3D Usb3NamedEventListen ( > &gEfiPciIoProtocolGuid, > TPL_NOTIFY, > -- > 2.7.0.windows.1 >=20 > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.01.org > https://lists.01.org/mailman/listinfo/edk2-devel