Linux Framebuffer Layer development
 help / color / mirror / Atom feed
* [PATCH 09/11] staging: sm750fb: remove assignment from if condition
@ 2015-06-28 23:44 Anatoly Stepanov
  0 siblings, 0 replies; only message in thread
From: Anatoly Stepanov @ 2015-06-28 23:44 UTC (permalink / raw)
  To: linux-fbdev



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

Signed-off-by: Anatoly Stepanov <drivengroove@gmail.com>
---
 drivers/staging/sm750fb/sm750_hw.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/sm750fb/sm750_hw.c b/drivers/staging/sm750fb/sm750_hw.c
index 3093c25..987da9e 100644
--- a/drivers/staging/sm750fb/sm750_hw.c
+++ b/drivers/staging/sm750fb/sm750_hw.c
@@ -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;
 	}
-- 
2.1.0


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2015-06-28 23:44 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-28 23:44 [PATCH 09/11] staging: sm750fb: remove assignment from if condition Anatoly Stepanov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox