From patchwork Thu May 23 18:35:10 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hariprasad Kelam X-Patchwork-Id: 10958633 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 9C02B76 for ; Thu, 23 May 2019 18:35:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 888F728712 for ; Thu, 23 May 2019 18:35:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7C93728716; Thu, 23 May 2019 18:35:26 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 35D4828712 for ; Thu, 23 May 2019 18:35:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Subject:To:From :Date:Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=mY2VJnBsRk9dvSLhWC38bC5JU82RQ6PEsdbkQe8FQvo=; b=ogi6Le16Vt6mO3 E1K23/fKgJwaU9IdF/QKzm0oSNAwACZt04RC8H3966XQQuHCPmml8cXfWswWwzKs5bCQ9BYwWNDrs 5wm0u3puP7Fi1mzSGMl0xZwaVcPUlFSSMunvrxV1d94g5nrE50NnKLiKek6Jqt0n9ew6e5akAV2v1 +zk3deMUIYoFMZJEadnJI2M3BCye5yAGdsYka3XvuMdEFTdc3aLyZQH4CO1lWjTRz7VJtotGYUCv2 H8j05WfP8Vi2BCCRzJWrUbrN30K5osIZWu5TI+k5aFSQuGGcHx5cbSOcuBZXu91tWwsNlF7temsba Y5+M59V7BblCFR/eDCWQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hTsYj-00052t-GT; Thu, 23 May 2019 18:35:21 +0000 Received: from mail-pg1-x542.google.com ([2607:f8b0:4864:20::542]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hTsYg-00052Q-CA; Thu, 23 May 2019 18:35:19 +0000 Received: by mail-pg1-x542.google.com with SMTP id h2so516224pgg.1; Thu, 23 May 2019 11:35:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:subject:message-id:mime-version:content-disposition :user-agent; bh=UGdXyM1CME4KwYx3fgLzBPCxywcWE4oo6EgOOlK8Fv4=; b=k+4H2kGkwk5LvYzjyAAzDQV621YQlhBCwYT7yzcPAaSpAEtVqW+TY+zhTG0yvSkrWj GQ6z3IUyCmpIffYXzTHyJq69fwRULEX54aMbMK8faxxk0RX1LWtkIXRgTxhkqQC7u7tH tz+W5oBXaKlZkhj8p/DOp4G833AnDwbzOKzqnKuiQ7Z82brOcHR6P+bX2ODxOYgpVCqh eivtfvor7iBVK83n3zl6enzJmyP5Q4SFoHjprVqRATAADIilXxgW2Rn50ZCAQV4BbSjk ACiKS4kvcD/YhpAqkTWULi+QhSJeu8ODFTdFMrk2QloGc6ebfTZQ9awBYhGHX44Af+dt NI4g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:subject:message-id:mime-version :content-disposition:user-agent; bh=UGdXyM1CME4KwYx3fgLzBPCxywcWE4oo6EgOOlK8Fv4=; b=mVaj0OFs5szYm0xFUHIwvd6vMQQ5BBJlvVsVLIUsCGRPyLNakfaOkr8VtZBXvoYGgB G2E2+o1uJS1wLOEJwjtdU3GaFkF+43kCPtSKkzZVHHp074FeXklxSX3Obih20AzwBDOi xVL+g8ONSiAzthJI2dme1rNPW/Ds7iRf1BGOjYP5830PAqVMB3BxEssey0bQc9QvvX8r WlR04Z5AUb8IGOsM0vUK9fBppu2mJDs6Tj3PT7GG4LnmJ5vcwwb8laSUir4jiUapzLn3 2pE9tL+ZZ59Na2FBzWqZAMTLn6juShtRAOi/y8gAl748hFnmQm1mWGrKDjslasYjq/c7 NgUQ== X-Gm-Message-State: APjAAAVBuhZ+Y1vk1dVD++lbF5saXcILN/5D2whnDyRucsXn8Hujyt8C jtmeLvfzMbLm0pc4U0BUpqQ= X-Google-Smtp-Source: APXvYqyAGgM62zL/Uh7TSDVYGilK6ktbyrCOFvLMxfqhvED4rFqQqXGVfzjK0DQt2Kn6xYezxdLwMQ== X-Received: by 2002:a65:42c3:: with SMTP id l3mr75585700pgp.372.1558636517476; Thu, 23 May 2019 11:35:17 -0700 (PDT) Received: from hari-Inspiron-1545 ([183.83.92.73]) by smtp.gmail.com with ESMTPSA id o7sm123715pfp.168.2019.05.23.11.35.13 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 23 May 2019 11:35:16 -0700 (PDT) Date: Fri, 24 May 2019 00:05:10 +0530 From: Hariprasad Kelam To: reg Kroah-Hartman , Matthias Brugger , Sergio Paracuellos , Mamta Shukla , NeilBrown , Peter Vernia , devel@driverdev.osuosl.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH] staging: mt7621-pci: pci-mt7621: Remove unneeded variable err Message-ID: <20190523183510.GA12942@hari-Inspiron-1545> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.24 (2015-08-30) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190523_113518_442040_B1421483 X-CRM114-Status: GOOD ( 11.14 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP devm_request_pci_bus_resources function will return -EBUSY/-ENOMEM in fail case and returns 0 on success. So no need to store return value in err variable. Signed-off-by: Hariprasad Kelam Reviewed-by: Sergio Paracuellos --- drivers/staging/mt7621-pci/pci-mt7621.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/staging/mt7621-pci/pci-mt7621.c b/drivers/staging/mt7621-pci/pci-mt7621.c index 03d919a..bc2a3d1 100644 --- a/drivers/staging/mt7621-pci/pci-mt7621.c +++ b/drivers/staging/mt7621-pci/pci-mt7621.c @@ -596,17 +596,12 @@ static int mt7621_pcie_request_resources(struct mt7621_pcie *pcie, struct list_head *res) { struct device *dev = pcie->dev; - int err; pci_add_resource_offset(res, &pcie->io, pcie->offset.io); pci_add_resource_offset(res, &pcie->mem, pcie->offset.mem); pci_add_resource(res, &pcie->busn); - err = devm_request_pci_bus_resources(dev, res); - if (err < 0) - return err; - - return 0; + return devm_request_pci_bus_resources(dev, res); } static int mt7621_pcie_register_host(struct pci_host_bridge *host,