diff mbox

target:fix condition return in core_pr_dump_initiator_port()

Message ID 20170824115937.2592-1-tang.wenji@zte.com.cn (mailing list archive)
State New, archived
Headers show

Commit Message

tang.wenji@zte.com.cn Aug. 24, 2017, 11:59 a.m. UTC
From: tangwenji <tang.wenji@zte.com.cn>

When is pr_reg->isid_present_at_reg is false,this function should return.

Signed-off-by: tangwenji <tang.wenji@zte.com.cn>
---
 drivers/target/target_core_pr.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
diff mbox

Patch

diff --git a/drivers/target/target_core_pr.c b/drivers/target/target_core_pr.c
index 6d5def64db61..cff99ce253e7 100644
--- a/drivers/target/target_core_pr.c
+++ b/drivers/target/target_core_pr.c
@@ -58,8 +58,10 @@  void core_pr_dump_initiator_port(
 	char *buf,
 	u32 size)
 {
-	if (!pr_reg->isid_present_at_reg)
+	if (!pr_reg->isid_present_at_reg) {
 		buf[0] = '\0';
+		return;
+	}
 
 	snprintf(buf, size, ",i,0x%s", pr_reg->pr_reg_isid);
 }