Received: by 2002:a25:86ce:0:0:0:0:0 with SMTP id y14csp2117203ybm; Thu, 23 May 2019 11:38:06 -0700 (PDT) X-Google-Smtp-Source: APXvYqwt/Cajh4dK3Rie7ylp/izWG3X/jbiJt/ppeHiP/BiAjJ0DWBHjCNZodfP2dUzCanc3GhVy X-Received: by 2002:a17:902:9a07:: with SMTP id v7mr101125491plp.180.1558636685962; Thu, 23 May 2019 11:38:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558636685; cv=none; d=google.com; s=arc-20160816; b=S9v+LOET2CvLckngUvwzDR2Qfs33KD/4Qa01zse97HzCMUSw9ccoeIxgOHVy5Oxmih BbdN8313NalrIbsHGO4K7eGsp8Os6NYEMzZfEgVXTDdrR3hXZ1RLkfqCjM/Yff3CS0nZ rVCXJuyKG6u1a6pjanBOhT1KUtGcYB5q/6OYONOF1LuiMVC31gJZTXHzFx+tvLCGeJuY EZo3ndWxqqGrcwJ1q7pisLRllmLnliDBlq5iXbDtCoeFgs+wtlGQWZZcv2RBv3+i8EyD OMTRV5d5GbuGHFRG/7vsL01NEZxH47DiQFcnfeB3SNcqxKyvwZK4iXK9kl/GJnhlmvbN xyQA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:content-disposition :mime-version:message-id:subject:to:from:date:dkim-signature; bh=UGdXyM1CME4KwYx3fgLzBPCxywcWE4oo6EgOOlK8Fv4=; b=BGYqQrRyT7867v+uxn9r+xVCO3aV1simbq3wqM74XYKSHXCvyj/WLyQhLT8pbwYoKo knx+etQHV32gQRBDiZ/JVyh1TFdX8f5tF+MlldVL8tcfhkY0THocnjFose2frxmJJIOY bOMMO8+IYlBDNx73LvBtqUyjNgp/zVeeXn6p2+AZp9KYlK9QcNB5CWOi6zgkBACeBN/2 WFwMM4axeSLiYlZXD2HiM/UiM9dv3PUiyYIE9t8TYYLZ7CgZQFHR0+XH+xTJ5Uf8VsxT thfKzV78g5IujzsXcZMJlQfiido4WKfXi8aloJzVecx26r7B4xZAcbexd5H12vQUr8va rQ+Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=k+4H2kGk; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r69si353575pgr.120.2019.05.23.11.37.50; Thu, 23 May 2019 11:38:05 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=k+4H2kGk; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731462AbfEWSfS (ORCPT + 99 others); Thu, 23 May 2019 14:35:18 -0400 Received: from mail-pg1-f195.google.com ([209.85.215.195]:44967 "EHLO mail-pg1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731261AbfEWSfS (ORCPT ); Thu, 23 May 2019 14:35:18 -0400 Received: by mail-pg1-f195.google.com with SMTP id n2so3559175pgp.11 for ; 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=I+vwedaQJTIKKTYXIpkK2xf5w/sLgp5KSvT3wVEHxATR0he337QipxmLVJmm8oQRZa PxAh0hzjMaQKk+GYydKIE9XbowyN/xMMAnAhfrjXyvUpniBWbM3kgLgGZ6Sk0TCQ42vH fsCnP5psLiu9kXAelfScO1nhPdgBt9fNw/c7noi1YzKn6D3+HAZhjeKVGlxTR+97cbyC azd8JhwiGfw6PO2JMEa4rrJUkMO3zs9IU6i6vMxNhdqEFF9zkXJfZXHjd8d9QFgRsuqf 0dJJJusdrS3oN9VyXsydHS8qpsWrNWVPrmtSWsi6lU2O7Um58QZ8zz6j/vV9ubY3SriT vUGg== X-Gm-Message-State: APjAAAW7RXQedE4nj1wXEYQAm6Ds3Hxb7WsBG1d+UjVYnGGFfplR2k4C qntmDZwuS5fFIyCqey2+kGU= 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-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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, -- 2.7.4