Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
EDAC, octeon: Fix an uninitialized variable warning
Fix an uninitialized variable warning in the Octeon EDAC driver, as seen in MIPS cavium_octeon_defconfig builds since v4.14 with Codescape GNU Tools 2016.05-03: drivers/edac/octeon_edac-lmc.c In function ‘octeon_lmc_edac_poll_o2’: drivers/edac/octeon_edac-lmc.c:87:24: warning: ‘((long unsigned int*)&int_reg)[1]’ may \ be used uninitialized in this function [-Wmaybe-uninitialized] if (int_reg.s.sec_err || int_reg.s.ded_err) { ^ Iinitialise the whole int_reg variable to zero before the conditional assignments in the error injection case. Signed-off-by: James Hogan <[email protected]> Acked-by: David Daney <[email protected]> Cc: linux-edac <[email protected]> Cc: [email protected] Cc: <[email protected]> # 3.15+ Fixes: 1bc021e ("EDAC: Octeon: Add error injection support") Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Borislav Petkov <[email protected]>
- Loading branch information