From 32f59976df2bc6a2e604547d74435d80ba8b8c96 Mon Sep 17 00:00:00 2001 From: "zhuxiaohui.400" Date: Fri, 21 Feb 2020 17:21:25 +0800 Subject: [PATCH] lib/iscsi:break the loop in iscsi_parse_portal_grp() when the portal section reaches the end Change-Id: Ia7a23833927e24b1f90a443b582b2f43ea00f450 Signed-off-by: zhuxiaohui.400 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/979 Reviewed-by: Shuhei Matsumoto Reviewed-by: Ziye Yang Reviewed-by: Changpeng Liu Tested-by: SPDK CI Jenkins --- lib/iscsi/portal_grp.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/iscsi/portal_grp.c b/lib/iscsi/portal_grp.c index 11f579476..cb4201c29 100644 --- a/lib/iscsi/portal_grp.c +++ b/lib/iscsi/portal_grp.c @@ -400,8 +400,7 @@ iscsi_parse_portal_grp(struct spdk_conf_section *sp) label = spdk_conf_section_get_nmval(sp, "Portal", i, 0); portal = spdk_conf_section_get_nmval(sp, "Portal", i, 1); if (label == NULL || portal == NULL) { - SPDK_ERRLOG("portal error\n"); - goto error; + break; } rc = iscsi_parse_portal(portal, &p);