4.4-stable review patch. If anyone has any objections, please let me know.
From: Arnd Bergmann <a...@arndb.de>
commit 00affcac69c7aae6c2cfcbc71f724e1c16d0b445 upstream.
gcc warns about the 'found' variable possibly being used uninitialized:
drivers/soc/qcom/spm.c: In function 'spm_dev_probe':
drivers/soc/qcom/spm.c:305:5: error: 'found' may be used uninitialized in this
However, the code is correct because we know that there is
always at least one online CPU. This initializes the 'found'
variable to zero before the loop so the compiler knows
it does not have to warn about it.
Signed-off-by: Arnd Bergmann <a...@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gre...@linuxfoundation.org>
drivers/soc/qcom/spm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
@@ -288,7 +288,7 @@ static struct spm_driver_data *spm_get_d
struct spm_driver_data *drv = NULL;
struct device_node *cpu_node, *saw_node;
- bool found;
+ bool found = 0;
cpu_node = of_cpu_device_node_get(cpu);