From 9a52ae2dd8c24a3ab53bb68ea2b5f94c11e3f5a8 Mon Sep 17 00:00:00 2001 From: Anatoly Stepanov Date: Mon, 29 Jun 2015 02:44:02 +0300 Subject: [PATCH] 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" Signed-off-by: Anatoly Stepanov Signed-off-by: Greg Kroah-Hartman --- 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 3093c2540bda..987da9e2aa2f 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.30.2