From: Jiaxin Wu <Jiaxin.wu@intel.com>
To: edk2-devel@lists.01.org
Cc: Ye Ting <ting.ye@intel.com>, Fu Siyuan <siyuan.fu@intel.com>,
Wu Hao A <hao.a.wu@intel.com>, Wu Jiaxin <jiaxin.wu@intel.com>
Subject: [PATCH v1 2/3] NetworkPkg/IScsiDxe: Remove unnecessary NULL pointer check.
Date: Thu, 17 Jan 2019 09:00:47 +0800 [thread overview]
Message-ID: <20190117010048.19020-3-Jiaxin.wu@intel.com> (raw)
In-Reply-To: <20190117010048.19020-1-Jiaxin.wu@intel.com>
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>
---
NetworkPkg/IScsiDxe/IScsiConfig.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/NetworkPkg/IScsiDxe/IScsiConfig.c b/NetworkPkg/IScsiDxe/IScsiConfig.c
index 83644f51d8..78135b411c 100644
--- a/NetworkPkg/IScsiDxe/IScsiConfig.c
+++ b/NetworkPkg/IScsiDxe/IScsiConfig.c
@@ -1,9 +1,9 @@
/** @file
Helper functions for configuring or getting the parameters relating to iSCSI.
-Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2004 - 2019, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php
@@ -2290,14 +2290,10 @@ IScsiConfigDeleteAttempts (
//
// Delete the attempt.
//
AttemptConfigData = NET_LIST_USER_STRUCT (Entry, ISCSI_ATTEMPT_CONFIG_NVDATA, Link);
- if (AttemptConfigData == NULL) {
- Status = EFI_NOT_FOUND;
- goto Error;
- }
//
// Remove this attempt from UI configured attempt list.
//
RemoveEntryList (&AttemptConfigData->Link);
--
2.17.1.windows.2
next prev parent reply other threads:[~2019-01-17 1:01 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-17 1:00 [PATCH v1 0/3] Remove unnecessary NULL pointer check Jiaxin Wu
2019-01-17 1:00 ` [PATCH v1 1/3] MdeModulePkg/Dhcp4Dxe: " Jiaxin Wu
2019-01-18 1:59 ` Fu, Siyuan
2019-01-18 2:17 ` Wu, Jiaxin
2019-01-17 1:00 ` Jiaxin Wu [this message]
2019-01-17 1:00 ` [PATCH v1 3/3] NetworkPkg/DnsDxe: " Jiaxin Wu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190117010048.19020-3-Jiaxin.wu@intel.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox