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 d2843c173e
  Author: Andy Grover <[email protected]>
  Date:   Thu May 16 10:40:55 2013 -0700

      target: Alter core_pr_dump_initiator_port for ease of use

Signed-off-by: tangwenji <[email protected]>
Signed-off-by: Nicholas Bellinger <[email protected]>
This commit is contained in:
tangwenji 2017-08-24 19:59:37 +08:00 • committed by Nicholas Bellinger
commit 24528f089d

View file

@ -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);
}