coresight: cti: Reduce scope for the variable 'cs_fwnode' in cti_plat_create_connection()
authorMarkus Elfring <elfring@users.sourceforge.net>
Mon, 1 Feb 2021 18:13:21 +0000 (11:13 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 4 Feb 2021 16:00:32 +0000 (17:00 +0100)
commit65b2728145771b0df18f85303b8ae152cd53f2de
tree8a639bf0ab4986901b600d3f016381fbd524510e
parent11a0b5e0ec8c13bef06f7414f9e914506140d5cb
coresight: cti: Reduce scope for the variable 'cs_fwnode' in cti_plat_create_connection()

A local variable was used only within an else branch.
Thus move the definition for the variable “cs_fwnode” into
the corresponding code block.

This issue was detected by using the Coccinelle software.

Link: https://lore.kernel.org/r/c1b09b27-9012-324f-28d0-ba820dc468a5@web.de
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Link: https://lore.kernel.org/r/20210201181351.1475223-2-mathieu.poirier@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/hwtracing/coresight/coresight-cti-platform.c