Public bug reported:
SRU Justification:
[Impact]
The 'smatch' static analyzer tool raised 5 warnings against the EDAC
driver. There is one warning for each call to "bluefield_edac_readl()"
since the code uses the result of the function call even if there is an
error (leaving resulting value uninitialized).
[Fix]
If the call to "bluefield_edac_readl()" fails, then the driver should
log details of the failure and then return early. The driver should not
continue after "bluefield_edac_readl()" failure and use the
uninitialized variable.
[Test Case]
Boot image on BF2 platform
Ensure bluefield_edac driver is loaded [see output of "lsmod"]
Ensure there are no errors or failures from EDAC driver [see output of "dmesg"]
[Regression Potential]
This patch improves code quality in the error paths of the driver, no
regression expected.
** Affects: linux-bluefield (Ubuntu)
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2109748
Title:
bluefield_edac: uses uninitialized var in error paths
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux-bluefield/+bug/2109748/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs