From patchwork Sun Jun 28 23:44:02 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anatoly Stepanov X-Patchwork-Id: 6686971 Return-Path: X-Original-To: patchwork-linux-fbdev@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 8F159C05AC for ; Sun, 28 Jun 2015 23:44:57 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id AEEE320524 for ; Sun, 28 Jun 2015 23:44:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8B9F520544 for ; Sun, 28 Jun 2015 23:44:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752637AbbF1Xox (ORCPT ); Sun, 28 Jun 2015 19:44:53 -0400 Received: from mail-la0-f42.google.com ([209.85.215.42]:33043 "EHLO mail-la0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752442AbbF1Xou (ORCPT ); Sun, 28 Jun 2015 19:44:50 -0400 Received: by laar3 with SMTP id r3so44566747laa.0 for ; Sun, 28 Jun 2015 16:44:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=KzZjQSHo8K0Hzk24ttvSlMLokCswxn/sh7tQADVzzu4=; b=Rr4hT7XXWAp1vDRCXUYJwYiHKwd4nGj9MGdq5V4hEFLcWAoT9zGR6NJmrOoI7nNCB8 50RMkdSZUh9XF5JjAqOg+bhKWYmSFV9hEfhJoJISI87ZkXZ7cAJtULOc9QbYfHG+dLdM um7GHoy7/wsk+jvnYMgE0kdD/+rK1DFMXk8Qq9hnltz1NxZbWpksI4bEp1b4GtHE6vzY 2To5nEIPeb8RFkziIzBer0ea89DehWqPgkFOqyVx+jCl/ZNuPu5DOCYOtw59Pn2dP/eq fv38P0sVexTWLbvwKl8oXBdjnfoHeQIwUmeJkRwkOeqpx+EItzwOkY4XDm2syxLN9rNB PLNw== X-Received: by 10.112.125.166 with SMTP id mr6mr11441967lbb.83.1435535088819; Sun, 28 Jun 2015 16:44:48 -0700 (PDT) Received: from localhost.localdomain (37-145-237-243.broadband.corbina.ru. [37.145.237.243]) by mx.google.com with ESMTPSA id t15sm10210918lbk.0.2015.06.28.16.44.48 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 28 Jun 2015 16:44:48 -0700 (PDT) From: Anatoly Stepanov To: sudipm.mukherjee@gmail.com, teddy.wang@siliconmotion.com, gregkh@linuxfoundation.org Cc: linux-fbdev@vger.kernel.org, devel@driverdev.osuosl.org, Anatoly Stepanov Subject: [PATCH 09/11] staging: sm750fb: remove assignment from if condition Date: Mon, 29 Jun 2015 02:44:02 +0300 Message-Id: <1435535044-22042-10-git-send-email-drivengroove@gmail.com> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1435535044-22042-1-git-send-email-drivengroove@gmail.com> References: <1435535044-22042-1-git-send-email-drivengroove@gmail.com> Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Remove assignment from if condition according to checkpatch.pl message: "ERROR: do not use assignment in if condition" Signed-off-by: Anatoly Stepanov --- 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; }