]> git.baikalelectronics.ru Git - kernel.git/commit
soc: qcom/spm: shut up uninitialized variable warning
authorArnd Bergmann <arnd@arndb.de>
Sun, 17 Jan 2016 00:02:56 +0000 (01:02 +0100)
committerArnd Bergmann <arnd@arndb.de>
Fri, 22 Jan 2016 10:49:45 +0000 (11:49 +0100)
commit17d171e2e089a43534a82019653c56dca354cf88
tree4a1772abe3d06e6e97e863d55f295446a89e7dcb
parent97b8e30bd09d5aa6b26817c1e62105e3998cd459
soc: qcom/spm: shut up uninitialized variable warning

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 function [-Werror=maybe-uninitialized]

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 <arnd@arndb.de>
drivers/soc/qcom/spm.c