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 for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240907160926.39556-1-riyandhiman14@gmail.com>
Date: Sat,  7 Sep 2024 21:39:26 +0530
From: Riyan Dhiman <riyandhiman14@...il.com>
To: jim2101024@...il.com,
	nsaenz@...nel.org,
	lorian.fainelli@...adcom.com,
	bcm-kernel-feedback-list@...adcom.com,
	bhelgaas@...gle.com
Cc: linux-pci@...r.kernel.org,
	linux-rpi-kernel@...ts.infradead.org,
	linux-arm-kernel@...ts.infradead.org,
	linux-kernel@...r.kernel.org,
	Riyan Dhiman <riyandhiman14@...il.com>
Subject: [PATCH next V2] PCI: brmstb: Fix type mismatch for num_inbound_wins in brcm_pcie_get_inbound_wins

Change num_inbound_wins from u8 to int to correctly handle
potential negative error codes returned by brcm_pcie_get_inbound_wins().
The u8 type was inappropriate for capturing the function's return value,
which can include error codes.

Signed-off-by: Riyan Dhiman <riyandhiman14@...il.com>
---
V2: Added missing semicolon in variable declaration

 drivers/pci/controller/pcie-brcmstb.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/pci/controller/pcie-brcmstb.c b/drivers/pci/controller/pcie-brcmstb.c
index e8332fe5396e..b2859c4fd931 100644
--- a/drivers/pci/controller/pcie-brcmstb.c
+++ b/drivers/pci/controller/pcie-brcmstb.c
@@ -1030,7 +1030,8 @@ static int brcm_pcie_setup(struct brcm_pcie *pcie)
 	struct pci_host_bridge *bridge;
 	struct resource_entry *entry;
 	u32 tmp, burst, aspm_support;
-	u8 num_out_wins = 0, num_inbound_wins = 0;
+	u8 num_out_wins = 0;
+	int num_inbound_wins = 0;
 	int memc, ret;
 
 	/* Reset the bridge */
-- 
2.46.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ