Re: [PATCH] mtd: nand: denali_pci: add missing pci_release_regions() calls

Boris Brezillon
2016-11-06T22:55:54Z

On Thu, 3 Nov 2016 02:13:10 +0900
Masahiro Yamada <yamada.masahiro@socionext.com> wrote:

> The probe function calls pci_request_regions(), but I do not see
> corresponding pci_release_regions() calls.
>
> While we are here, rename the jump labels to follow the guideline
> "Choose label names which say what the goto does" suggested by
> Documentation/CodingStyle.
>
> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>

Applied.

Thanks,

Boris

> ---
>
> drivers/mtd/nand/denali_pci.c | 14 +++++++++-----
> 1 file changed, 9 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/mtd/nand/denali_pci.c b/drivers/mtd/nand/denali_pci.c
> index de31514..be8152f 100644
> --- a/drivers/mtd/nand/denali_pci.c
> +++ b/drivers/mtd/nand/denali_pci.c
> @@ -76,28 +76,31 @@ static int denali_pci_probe(struct pci_dev *dev, const struct pci_device_id *id)
> denali->flash_reg = ioremap_nocache(csr_base, csr_len);
> if (!denali->flash_reg) {
> dev_err(&dev->dev, "Spectra: Unable to remap memory region\n");
> - return -ENOMEM;
> + ret = -ENOMEM;
> + goto release_regions;
> }
>
> denali->flash_mem = ioremap_nocache(mem_base, mem_len);
> if (!denali->flash_mem) {
> dev_err(&dev->dev, "Spectra: ioremap_nocache failed!");