Commit 24528f08 authored by tangwenji's avatar tangwenji Committed by Nicholas Bellinger

target:fix condition return in core_pr_dump_initiator_port()

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

This fixes a regression originally introduced by:

  commit d2843c17
  Author: Andy Grover <agrover@redhat.com>
  Date:   Thu May 16 10:40:55 2013 -0700

      target: Alter core_pr_dump_initiator_port for ease of use
Signed-off-by: default avatartangwenji <tang.wenji@zte.com.cn>
Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
parent a2db857b
......@@ -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);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment