Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1276293
| From | Sudip Mukherjee <sudipm.mukherjee@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH v2 4/5] lightnvm: release dev if dma pools fails |
| Date | 2015-11-24 11:40 +0100 |
| Message-ID | <qyjaW-6V9-13@gated-at.bofh.it> (permalink) |
| References | <qyjaW-6V9-7@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
If create_dma_pools() fails then we just returned the error code but we
missed freeing the device.
Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
---
drivers/lightnvm/core.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/lightnvm/core.c b/drivers/lightnvm/core.c
index d288996..9dd1623 100644
--- a/drivers/lightnvm/core.c
+++ b/drivers/lightnvm/core.c
@@ -318,6 +318,7 @@ int nvm_register(struct request_queue *q, char *disk_name,
"ppalist");
if (!dev->ppalist_pool) {
pr_err("nvm: could not create ppa pool\n");
+ nvm_free(dev);
return -ENOMEM;
}
}
--
1.9.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v2 1/5] lightnvm: fix memory leak Sudip Mukherjee <sudipm.mukherjee@gmail.com> - 2015-11-24 11:40 +0100
[PATCH v2 4/5] lightnvm: release dev if dma pools fails Sudip Mukherjee <sudipm.mukherjee@gmail.com> - 2015-11-24 11:40 +0100
Re: [PATCH v2 4/5] lightnvm: release dev if dma pools fails Matias Bjørling <mb@lightnvm.io> - 2015-11-24 12:10 +0100
[PATCH v2 5/5] lightnvm: return error if manager not found Sudip Mukherjee <sudipm.mukherjee@gmail.com> - 2015-11-24 11:40 +0100
Re: [PATCH v2 5/5] lightnvm: return error if manager not found Matias Bjørling <mb@lightnvm.io> - 2015-11-24 12:20 +0100
[PATCH v2 2/5] lightnvm: check for max sector Sudip Mukherjee <sudipm.mukherjee@gmail.com> - 2015-11-24 11:40 +0100
Re: [PATCH v2 2/5] lightnvm: check for max sector Matias Bjørling <mb@lightnvm.io> - 2015-11-24 12:10 +0100
[PATCH v2 3/5] lightnvm: create dma pool first Sudip Mukherjee <sudipm.mukherjee@gmail.com> - 2015-11-24 11:40 +0100
Re: [PATCH v2 3/5] lightnvm: create dma pool first Matias Bjørling <mb@lightnvm.io> - 2015-11-24 12:10 +0100
Re: [PATCH v2 1/5] lightnvm: fix memory leak Matias Bjørling <m@bjorling.me> - 2015-11-24 12:00 +0100
csiph-web