Skip to content

Commit 6bcfdc4

Browse files
Minghao Chitsbogend
authored andcommitted
mips/pci: remove redundant ret variable
Return value from rt3883_pci_r32() directly instead of taking this in another redundant variable. Reported-by: Zeal Robot <[email protected]> Signed-off-by: Minghao Chi <[email protected]> Signed-off-by: CGEL ZTE <[email protected]> Signed-off-by: Thomas Bogendoerfer <[email protected]>
1 parent a029ccc commit 6bcfdc4

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

arch/mips/pci/pci-rt3883.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,14 +102,12 @@ static u32 rt3883_pci_read_cfg32(struct rt3883_pci_controller *rpc,
102102
unsigned func, unsigned reg)
103103
{
104104
u32 address;
105-
u32 ret;
106105

107106
address = rt3883_pci_get_cfgaddr(bus, slot, func, reg);
108107

109108
rt3883_pci_w32(rpc, address, RT3883_PCI_REG_CFGADDR);
110-
ret = rt3883_pci_r32(rpc, RT3883_PCI_REG_CFGDATA);
111109

112-
return ret;
110+
return rt3883_pci_r32(rpc, RT3883_PCI_REG_CFGDATA);
113111
}
114112

115113
static void rt3883_pci_write_cfg32(struct rt3883_pci_controller *rpc,

0 commit comments

Comments
 (0)