[PATCH v2] PCI: brcmstb: Add missing if statement and error path

Florian Fainelli f.fainelli at gmail.com
Mon Sep 21 17:21:42 EDT 2020


On 9/21/20 2:16 PM, Alex Dewar wrote:
> brcm_pcie_resume() contains a return statement that was presumably
> intended to have an "if (ret)" in front of it, otherwise the function
> returns prematurely. Fix this.
> 
> Additionally, redisable the clock on the error path.
> 
> I don't know if this code was tested or not, but I assume that this bug
> means that this driver will not resume properly.
> 
> Fixes: ad3d29c77e1e ("PCI: brcmstb: Add control of rescal reset")
> Addresses-Coverity: CID 1497099: Control flow issues (UNREACHABLE)
> Signed-off-by: Alex Dewar <alex.dewar90 at gmail.com>
> ---
You need to coordinate with Colin, or with whomever is looking at
Coverity defects, because he just submitted a similar patch minutes ago:

https://lore.kernel.org/linux-arm-kernel/20200921211555.383458-1-colin.king@canonical.com/
-- 
Florian



More information about the linux-arm-kernel mailing list