Skip to contentSkip to conversation

staging: mt7621-pci: IF statement expression comparing to NULL

PATCH Superseded Branden Bonaby 2 participants 3 messages Mar 12, 2019 – Mar 13, 2019

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

PATCH 1/1 staging: mt7621-pci: IF statement expression comparing to NULL

Remove comparison to NULL in the if statement expression to match the Linux Kernel coding style.
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.17.1
#1 lore raw

PATCH v2 1/1 staging: mt7621-pci: IF statement expression comparing to NULL

Remove comparison to NULL in the if statement expression to match the Linux Kernel coding style.
CHECK: Comparison to NULL could be written "res"

---
Changes in v2
sent email commit to correct driver maintainers

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.17.1
maintainer Reviewed-by on v2 1/1
#2 lore raw
Quoted 5 lines · Branden Bonaby

Remove comparison to NULL in the if statement expression to match the Linux Kernel coding style.
CHECK: Comparison to NULL could be written "res"

Quoted 21 lines

---
Changes in v2
sent email commit to correct driver maintainers

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);
 	}