Skip to contentSkip to conversation

staging: sm750fb: remove assignment from if condition

PATCH New Anatoly Stepanov 1 participant 1 message Jun 28, 2015

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

PATCH 9/11 staging: sm750fb: remove assignment from if condition

Remove assignment from if condition according to checkpatch.pl message:
"ERROR: do not use assignment in if condition"

---
 drivers/staging/sm750fb/sm750_hw.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
drivers/staging/sm750fb/sm750_hw.c +4 -3
index 3093c25..987da9e 100644
@@ -43,8 +43,8 @@ int hw_sm750_map(struct lynx_share *share, struct pci_dev *pdev)
 	 * in lynxfb_remove, or memory will not be mapped again
 	 * successfully
 	 * */
-
-	if ((ret = pci_request_region(pdev, 1, "sm750fb"))) {
+	ret = pci_request_region(pdev, 1, "sm750fb");
+	if (ret) {
 		pr_err("Can not request PCI regions.\n");
 		goto exit;
 	}
@@ -77,7 +77,8 @@ int hw_sm750_map(struct lynx_share *share, struct pci_dev *pdev)
 
 	/* reserve the vidmem space of smi adaptor */
 #if 0
-	if ((ret = pci_request_region(pdev, 0, _moduleName_))) {
+	ret = pci_request_region(pdev, 0, _moduleName_);
+	if (ret) {
 		pr_err("Can not request PCI regions.\n");
 		goto exit;
 	}
Signature · 1 line
2.1.0