Skip to contentSkip to conversation

staging: mt7621-pci: remove comparison to null to fix checkpatch warning

PATCH In review Jules Irenge 2 participants 2 messages Apr 1, 2019 – Apr 2, 2019

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: mt7621-pci: remove comparison to null to fix checkpatch warning

remove comparison to null to fix warning reported by checkpatch.pl tool
"CHECK: Comparison to NULL could be written "res""

---
 drivers/staging/mt7621-pci/pci-mt7621.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/mt7621-pci/pci-mt7621.c +1 -1
index 379ae780c691..03d919a94552 100644
@@ -275,7 +275,7 @@ static int mt7621_pci_parse_request_of_pci_ranges(struct mt7621_pcie *pcie)
 			break;
 		}
 
-		if (res != NULL)
+		if (res)
 			of_pci_range_to_resource(&range, node, res);
 	}
 
Signature · 1 line
2.20.1
maintainer
#1 lore raw
Quoted 14 lines · Jules Irenge

remove comparison to null to fix warning reported by checkpatch.pl tool
"CHECK: Comparison to NULL could be written "res""

---
 drivers/staging/mt7621-pci/pci-mt7621.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/mt7621-pci/pci-mt7621.c +0 -0
index 379ae780c691..03d919a94552 100644

drivers/staging/mt7621-pci/pci-mt7621.c static int mt7621_pci_parse_request_of_pci_ranges(struct mt7621_pcie *pcie) · line 281

Quoted 8 lines
drivers/staging/mt7621-pci/pci-mt7621.c +1 -1
@@ -275,7 +275,7 @@ static int mt7621_pci_parse_request_of_pci_ranges(struct mt7621_pcie *pcie)
 			break;
 		}
 
-		if (res != NULL)
+		if (res)
 			of_pci_range_to_resource(&range, node, res);
 	}
 

This patch does not apply to my staging-testing branch at all :(