[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190821124337.GB21839@ulmo>
Date: Wed, 21 Aug 2019 14:43:37 +0200
From: Thierry Reding <thierry.reding@...il.com>
To: Colin King <colin.king@...onical.com>
Cc: Vidya Sagar <vidyas@...dia.com>,
Lorenzo Pieralisi <lorenzo.pieralisi@....com>,
Bjorn Helgaas <bhelgaas@...gle.com>,
Jonathan Hunter <jonathanh@...dia.com>,
linux-pci@...r.kernel.org, linux-tegra@...r.kernel.org,
kernel-janitors@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH][next] PCI: tegra: tegra194: fix phy_count less than zero
check
On Wed, Aug 21, 2019 at 01:01:23PM +0100, Colin King wrote:
> From: Colin Ian King <colin.king@...onical.com>
>
> The check for pcie->phy_count < 0 is always false because phy_count
> is an unsigned int and can never be less than zero. Fix this by
> assigning ret to the return from of_property_count_strings and
> checking if this is less than zero instead.
>
> Addresses-Coverity: ("Dead code")
> Fixes: 6404441c8e13 ("PCI: tegra: Add Tegra194 PCIe support")
> Signed-off-by: Colin Ian King <colin.king@...onical.com>
> ---
> drivers/pci/controller/dwc/pcie-tegra194.c | 9 +++++----
> 1 file changed, 5 insertions(+), 4 deletions(-)
Good catch!
Acked-by: Thierry Reding <treding@...dia.com>
Download attachment "signature.asc" of type "application/pgp-signature" (834 bytes)
Powered by blists - more mailing lists