lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Fri, 24 May 2019 07:54:08 +0200
From:   Sergio Paracuellos <sergio.paracuellos@...il.com>
To:     Hariprasad Kelam <hariprasad.kelam@...il.com>
Cc:     reg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Matthias Brugger <matthias.bgg@...il.com>,
        Mamta Shukla <mamtashukla555@...il.com>,
        NeilBrown <neil@...wn.name>,
        Peter Vernia <peter.vernia@...il.com>,
        devel@...verdev.osuosl.org, linux-arm-kernel@...ts.infradead.org,
        linux-mediatek@...ts.infradead.org,
        linux-kernel <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] staging: mt7621-pci: pci-mt7621: Remove unneeded variable err

Hi Hariprasad,


On Thu, May 23, 2019 at 8:35 PM Hariprasad Kelam
<hariprasad.kelam@...il.com> 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 <hariprasad.kelam@...il.com>
> ---
>  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 <sergio.paracuellos@...il.com>

>  static int mt7621_pcie_register_host(struct pci_host_bridge *host,
> --
> 2.7.4
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ