* [PATCH -next] denali_pci: Fix missing pci_release_regions in probe and remove
@ 2024-08-14 9:28 Chen Ridong
2024-08-23 17:26 ` Miquel Raynal
0 siblings, 1 reply; 3+ messages in thread
From: Chen Ridong @ 2024-08-14 9:28 UTC (permalink / raw)
To: miquel.raynal, richard, vigneshr; +Cc: linux-mtd
The pci_release_regions was miss at error case, just add it.
Signed-off-by: Chen Ridong <chenridong@huawei.com>
---
drivers/mtd/nand/raw/denali_pci.c | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/drivers/mtd/nand/raw/denali_pci.c b/drivers/mtd/nand/raw/denali_pci.c
index de7e722d3826..e22094e39546 100644
--- a/drivers/mtd/nand/raw/denali_pci.c
+++ b/drivers/mtd/nand/raw/denali_pci.c
@@ -77,18 +77,20 @@ static int denali_pci_probe(struct pci_dev *dev, const struct pci_device_id *id)
denali->reg = devm_ioremap(denali->dev, csr_base, csr_len);
if (!denali->reg) {
dev_err(&dev->dev, "Spectra: Unable to remap memory region\n");
- return -ENOMEM;
+ ret = -ENOMEM;
+ goto regions_release;
}
denali->host = devm_ioremap(denali->dev, mem_base, mem_len);
if (!denali->host) {
dev_err(&dev->dev, "Spectra: ioremap failed!");
- return -ENOMEM;
+ ret = -ENOMEM;
+ goto regions_release;
}
ret = denali_init(denali);
if (ret)
- return ret;
+ goto regions_release;
nsels = denali->nbanks;
@@ -116,6 +118,8 @@ static int denali_pci_probe(struct pci_dev *dev, const struct pci_device_id *id)
out_remove_denali:
denali_remove(denali);
+regions_release:
+ pci_release_regions(dev);
return ret;
}
@@ -123,6 +127,7 @@ static void denali_pci_remove(struct pci_dev *dev)
{
struct denali_controller *denali = pci_get_drvdata(dev);
+ pci_release_regions(dev);
denali_remove(denali);
}
--
2.34.1
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH -next] denali_pci: Fix missing pci_release_regions in probe and remove
2024-08-14 9:28 [PATCH -next] denali_pci: Fix missing pci_release_regions in probe and remove Chen Ridong
@ 2024-08-23 17:26 ` Miquel Raynal
2024-08-26 1:48 ` chenridong
0 siblings, 1 reply; 3+ messages in thread
From: Miquel Raynal @ 2024-08-23 17:26 UTC (permalink / raw)
To: Chen Ridong; +Cc: richard, vigneshr, linux-mtd
Hi Chen,
chenridong@huawei.com wrote on Wed, 14 Aug 2024 09:28:54 +0000:
> The pci_release_regions was miss at error case, just add it.
I was about to take this but the subject prefix is wrong. Please fix it.
Thanks,
Miquèl
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH -next] denali_pci: Fix missing pci_release_regions in probe and remove
2024-08-23 17:26 ` Miquel Raynal
@ 2024-08-26 1:48 ` chenridong
0 siblings, 0 replies; 3+ messages in thread
From: chenridong @ 2024-08-26 1:48 UTC (permalink / raw)
To: Miquel Raynal; +Cc: richard, vigneshr, linux-mtd
On 2024/8/24 1:26, Miquel Raynal wrote:
> Hi Chen,
>
> chenridong@huawei.com wrote on Wed, 14 Aug 2024 09:28:54 +0000:
>
>> The pci_release_regions was miss at error case, just add it.
>
> I was about to take this but the subject prefix is wrong. Please fix it.
>
> Thanks,
> Miquèl
Thanks, I will send a new one.
Thanks,
Ridong
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-08-26 1:49 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-14 9:28 [PATCH -next] denali_pci: Fix missing pci_release_regions in probe and remove Chen Ridong
2024-08-23 17:26 ` Miquel Raynal
2024-08-26 1:48 ` chenridong
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox