[Linux-kernel-mentees] [RFC PATCH 33/35] arm/PCI: Tidy Success/Failure checks

Saheed O. Bolarinwa refactormyself at gmail.com
Mon Jul 13 12:22:45 UTC 2020


Remove unnecessary check for 0.

Signed-off-by: "Saheed O. Bolarinwa" <refactormyself at gmail.com>
---
This patch depends on PATCH 32/35

 arch/arm/mach-cns3xxx/pcie.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/mach-cns3xxx/pcie.c b/arch/arm/mach-cns3xxx/pcie.c
index 7020071a2dc5..c249d4cbf4f0 100644
--- a/arch/arm/mach-cns3xxx/pcie.c
+++ b/arch/arm/mach-cns3xxx/pcie.c
@@ -92,7 +92,7 @@ static int cns3xxx_pci_read_config(struct pci_bus *bus, unsigned int devfn,
 
 	ret = pci_generic_config_read(bus, devfn, where, size, val);
 
-	if (ret == 0 && !bus->number && !devfn &&
+	if (!ret && !bus->number && !devfn &&
 	    (where & 0xffc) == PCI_CLASS_REVISION)
 		/*
 		 * RC's class is 0xb, but Linux PCI driver needs 0x604
-- 
2.18.2



More information about the Linux-kernel-mentees mailing list