• Arnd Bergmann's avatar
    soc: qcom/spm: shut up uninitialized variable warning · 00affcac
    Arnd Bergmann authored
    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: default avatarArnd Bergmann <arnd@arndb.de>
    00affcac
spm.c 9.6 KB