Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp28418ybi; Thu, 23 May 2019 22:56:29 -0700 (PDT) X-Google-Smtp-Source: APXvYqyGLFWOr51e6TBbh82Ox8ou7Xl+AEmySqJP/e39boBhdha3KyXvTaY8coHMvVeCmr/TmXI4 X-Received: by 2002:a63:2226:: with SMTP id i38mr8088463pgi.403.1558677389019; Thu, 23 May 2019 22:56:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558677389; cv=none; d=google.com; s=arc-20160816; b=NWoVgML5Z2jGc9MxjvZJIJ3dANGVUvBb2EnKfT3jp8xRh2roJPgUBfxtNxzWwikQkS O+OiIq8DvROQ1UD72frJEWml7mCdp9KKfslYz31Wq9YBhJqGQ1kuMPXhgbqQvbLd2Emp jc0olhUZJawVpu7MW+b9KzfieAOEUBVwqHEedSjI5o2OpWiFDN19pI+68WtnaP+fqqRY X8oHuWKbNaN8Slc9YM+/gTjVtoiJhRpi9ZulLJaiy2RG+wdTRQnig2WTUbIQ0MBlcV1T nTOOkCeESRiOcHIg4G5Yt5egp1pvhUnUG8NPrCc+VUnlLY04yFrvdTS7t157IlsQBHU5 5CYg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=7Ebgv3UeXA0WytHreGCVh/7DQkPpVomBIGZeLwu/7es=; b=zrVyAYt7VDjsJtuvJRgJUZdm0F08APBtgOrGDufI41HkP1l1pg2SLMz+N4HohoshVt 3tWXPepDGrvDwqkHXuKPz2sdJkbS+jZnrUWJ1a3FFUsUbxYuN18Oz0+/sVzeLGBhEnDg GtAludeXM7963yuswpRcR+Q/p4JUKJRZQUqhyzitGAydCeBGkvF+mZtTY6IYIJCh6sUX Dulq6sRFRLCLMXYyi3KOy3oYcjmSf0AGs7d/HQXY302hs7baHKlOb0i2j+5oWTvvGG3d wX7Jf4v9AGblVXtKa7sbGQbKNQPfdcMzXFCuCJ9VokNQnnIHibwpixezpYhn7/c5zQ6M 5XgQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=WzxkgAyR; 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 j63si2683119pge.132.2019.05.23.22.56.09; Thu, 23 May 2019 22:56:29 -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=WzxkgAyR; 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 S2388873AbfEXFyU (ORCPT + 99 others); Fri, 24 May 2019 01:54:20 -0400 Received: from mail-oi1-f196.google.com ([209.85.167.196]:42923 "EHLO mail-oi1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387703AbfEXFyT (ORCPT ); Fri, 24 May 2019 01:54:19 -0400 Received: by mail-oi1-f196.google.com with SMTP id w9so6164915oic.9 for ; Thu, 23 May 2019 22:54:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=7Ebgv3UeXA0WytHreGCVh/7DQkPpVomBIGZeLwu/7es=; b=WzxkgAyRBYozpQ9xwmo4jx8O4OFRtPU6J0nptXrnuf+XflBtgcZgTRHwcpnbhEmVAv usBq5i6iGIoTGhH3T4ughQUWoLxun4lJZmnw1D8s4AkM/5A9zCYhUuMJBwBaLG+74xd9 cAJfKD65CbgSvqMGfCS9b1xHDIkd6gZI3ar5Z0XvUqUhAaBYVGsX6H7b5uccDJt4eySU MYSo6jGHbKD9L9dnKS05g0Qm1ycdhH2tguBQh9rWV2gyIdEYwANqfWndBfUxBDYMSXb/ AzwcI7cP0mhIZnAUnajbr1n0shjsHYdDtiW7moPVVpFA5DhZpV4qTI20AA2LFMx70I7h zf0A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=7Ebgv3UeXA0WytHreGCVh/7DQkPpVomBIGZeLwu/7es=; b=lWJrUSZgLwx/8JX0drSJPJtanmgG6nLKh0skloAkQr2mgCJGOVc6cWMAZhkeMoQ1av gciPogQTt1gPqlED7Prsq5qwhpFjc/OpmC2b5nMd09cXu6S2mec+290oBJ1ToXMrBhbi 92IqlgZiLc4G68+r/Zw6kDWYRdsqgsuCe8hV0cUnPp0b/TQ0uC7wcktEaEQI4fhXxltj anu68r3SCWnyC2xjf5z+0uW3eK8rAiKt53L8yzLkL/UQMIBMLZKOg62nmii+uZNIxK6M CTdhvHlx4nkI9A//dEYwkmulHCkSI7v6+SZI6ptcU6R4ROawE14GBkPbqZvl4s/rieY/ SuLA== X-Gm-Message-State: APjAAAVqZD+k3vNV+yid0uLOyx88sB4oAmn/jdoaZ7MDCxIvRDdLd9Ib 8qOGw5YbXDPLUEZyv7xftTUkpQlUkdjBYbP7tHA= X-Received: by 2002:aca:3c85:: with SMTP id j127mr5285364oia.29.1558677259014; Thu, 23 May 2019 22:54:19 -0700 (PDT) MIME-Version: 1.0 References: <20190523183510.GA12942@hari-Inspiron-1545> In-Reply-To: <20190523183510.GA12942@hari-Inspiron-1545> From: Sergio Paracuellos Date: Fri, 24 May 2019 07:54:08 +0200 Message-ID: Subject: Re: [PATCH] staging: mt7621-pci: pci-mt7621: Remove unneeded variable err To: Hariprasad Kelam Cc: reg Kroah-Hartman , Matthias Brugger , Mamta Shukla , NeilBrown , Peter Vernia , devel@driverdev.osuosl.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-kernel Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Hariprasad, On Thu, May 23, 2019 at 8:35 PM Hariprasad Kelam wrote: > > 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); > } > In the patch title, the "mt7621-pci" is repeated twice. With that changed: Reviewed-by: Sergio Paracuellos > static int mt7621_pcie_register_host(struct pci_host_bridge *host, > -- > 2.7.4 >