[PATCH linux-next] PCI: iproc: Remove the unneeded result variable

cgel.zte at gmail.com cgel.zte at gmail.com
Tue Sep 6 00:16:36 PDT 2022


From: ye xingchen <ye.xingchen at zte.com.cn>

Return the value iproc_pcie_setup_ib() directly instead of storing it in
another redundant variable.

Reported-by: Zeal Robot <zealci at zte.com.cn>
Signed-off-by: ye xingchen <ye.xingchen at zte.com.cn>
---
 drivers/pci/controller/pcie-iproc.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/pci/controller/pcie-iproc.c b/drivers/pci/controller/pcie-iproc.c
index 2519201b0e51..bd32929ab265 100644
--- a/drivers/pci/controller/pcie-iproc.c
+++ b/drivers/pci/controller/pcie-iproc.c
@@ -1244,7 +1244,6 @@ static int iproce_pcie_get_msi(struct iproc_pcie *pcie,
 
 static int iproc_pcie_paxb_v2_msi_steer(struct iproc_pcie *pcie, u64 msi_addr)
 {
-	int ret;
 	struct resource_entry entry;
 
 	memset(&entry, 0, sizeof(entry));
@@ -1254,8 +1253,7 @@ static int iproc_pcie_paxb_v2_msi_steer(struct iproc_pcie *pcie, u64 msi_addr)
 	entry.res->start = msi_addr;
 	entry.res->end = msi_addr + SZ_32K - 1;
 
-	ret = iproc_pcie_setup_ib(pcie, &entry, IPROC_PCIE_IB_MAP_IO);
-	return ret;
+	return iproc_pcie_setup_ib(pcie, &entry, IPROC_PCIE_IB_MAP_IO);
 }
 
 static void iproc_pcie_paxc_v2_msi_steer(struct iproc_pcie *pcie, u64 msi_addr,
-- 
2.25.1



More information about the linux-arm-kernel mailing list