mips/pci: remove redundant ret variable
authorMinghao Chi <chi.minghao@zte.com.cn>
Tue, 4 Jan 2022 11:20:24 +0000 (11:20 +0000)
committerThomas Bogendoerfer <tsbogend@alpha.franken.de>
Wed, 5 Jan 2022 08:54:08 +0000 (09:54 +0100)
Return value from rt3883_pci_r32() directly instead
of taking this in another redundant variable.

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn>
Signed-off-by: CGEL ZTE <cgel.zte@gmail.com>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
arch/mips/pci/pci-rt3883.c

index d3c947f..e07ae09 100644 (file)
@@ -102,14 +102,12 @@ static u32 rt3883_pci_read_cfg32(struct rt3883_pci_controller *rpc,
                               unsigned func, unsigned reg)
 {
        u32 address;
-       u32 ret;
 
        address = rt3883_pci_get_cfgaddr(bus, slot, func, reg);
 
        rt3883_pci_w32(rpc, address, RT3883_PCI_REG_CFGADDR);
-       ret = rt3883_pci_r32(rpc, RT3883_PCI_REG_CFGDATA);
 
-       return ret;
+       return rt3883_pci_r32(rpc, RT3883_PCI_REG_CFGDATA);
 }
 
 static void rt3883_pci_write_cfg32(struct rt3883_pci_controller *rpc,