lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <c9d7435b-42a1-2e40-7d40-62d227523f79@gmail.com>
Date:   Mon, 21 Sep 2020 12:42:58 -0700
From:   Florian Fainelli <f.fainelli@...il.com>
To:     Colin King <colin.king@...onical.com>,
        Nicolas Saenz Julienne <nsaenzjulienne@...e.de>,
        Lorenzo Pieralisi <lorenzo.pieralisi@....com>,
        Rob Herring <robh@...nel.org>,
        Bjorn Helgaas <bhelgaas@...gle.com>,
        bcm-kernel-feedback-list@...adcom.com,
        Jim Quinlan <jquinlan@...adcom.com>,
        linux-rpi-kernel@...ts.infradead.org,
        linux-arm-kernel@...ts.infradead.org, linux-pci@...r.kernel.org
Cc:     kernel-janitors@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH][next] PCI: brcmstb: fix a missing if statement on a
 return error check

On 9/21/20 7:40 AM, Colin King wrote:
> From: Colin Ian King <colin.king@...onical.com>
> 
> The error return ret is not being check with an if statement and
> currently the code always returns leaving the following code as
> dead code. Fix this by adding in the missing if statement.
> 
> Addresses-Coverity: ("Structurally dead code")
> Fixes: ad3d29c77e1e ("PCI: brcmstb: Add control of rescal reset")
> Signed-off-by: Colin Ian King <colin.king@...onical.com>
> ---
>  drivers/pci/controller/pcie-brcmstb.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/pci/controller/pcie-brcmstb.c b/drivers/pci/controller/pcie-brcmstb.c
> index 7a3ff4632e7c..cb0c11b7308e 100644
> --- a/drivers/pci/controller/pcie-brcmstb.c
> +++ b/drivers/pci/controller/pcie-brcmstb.c
> @@ -1154,6 +1154,7 @@ static int brcm_pcie_resume(struct device *dev)
>  	clk_prepare_enable(pcie->clk);
>  
>  	ret = brcm_phy_start(pcie);
> +	if (ret)
>  		return ret;

Maybe this should also disable the clock if we failed to start the PHY
somehow.
-- 
Florian

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ