]> git.proxmox.com Git - mirror_edk2.git/commitdiff
NetworkPkg/IScsiDxe: Remove unnecessary NULL pointer check.
authorJiaxin Wu <Jiaxin.wu@intel.com>
Wed, 16 Jan 2019 02:54:42 +0000 (10:54 +0800)
committerJiaxin Wu <Jiaxin.wu@intel.com>
Wed, 23 Jan 2019 00:46:49 +0000 (08:46 +0800)
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1469

Since the value of AttemptConfigData is retrieved from the list
Entry, it can't be the NULL pointer, so just remove the unnecessary
check.

Cc: Ye Ting <ting.ye@intel.com>
Cc: Fu Siyuan <siyuan.fu@intel.com>
Cc: Wu Hao A <hao.a.wu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Wu Jiaxin <jiaxin.wu@intel.com>
Reviewed-by: Wu Hao A <hao.a.wu@intel.com>
Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
NetworkPkg/IScsiDxe/IScsiConfig.c

index 83644f51d8d5055c75d20f931383a9d9dfb25b76..78135b411c6973a7eedc9b3c4d585298a47ecfec 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Helper functions for configuring or getting the parameters relating to iSCSI.\r
 \r
-Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2004 - 2019, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -2292,10 +2292,6 @@ IScsiConfigDeleteAttempts (
     //\r
 \r
     AttemptConfigData = NET_LIST_USER_STRUCT (Entry, ISCSI_ATTEMPT_CONFIG_NVDATA, Link);\r
-    if (AttemptConfigData == NULL) {\r
-      Status = EFI_NOT_FOUND;\r
-      goto Error;\r
-    }\r
 \r
     //\r
     // Remove this attempt from UI configured attempt list.\r