From: tangwenji Date: Thu, 24 Aug 2017 11:59:37 +0000 (+0800) Subject: target:fix condition return in core_pr_dump_initiator_port() X-Git-Tag: v4.14.8~104 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=23d3f106f88ca21fd2911ae2f3a4f8aa7b56fddc;p=platform%2Fkernel%2Flinux-rpi.git target:fix condition return in core_pr_dump_initiator_port() [ Upstream commit 24528f089d0a444070aa4f715ace537e8d6bf168 ] When is pr_reg->isid_present_at_reg is false,this function should return. This fixes a regression originally introduced by: commit d2843c173ee53cf4c12e7dfedc069a5bc76f0ac5 Author: Andy Grover Date: Thu May 16 10:40:55 2013 -0700 target: Alter core_pr_dump_initiator_port for ease of use Signed-off-by: tangwenji Signed-off-by: Nicholas Bellinger Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/target/target_core_pr.c b/drivers/target/target_core_pr.c index 9f25c9c..4ba5004 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); }