summaryrefslogtreecommitdiff
path: root/drivers/lightnvm/pblk-core.c
diff options
context:
space:
mode:
authorJavier González <javier@cnexlabs.com>2017-10-13 15:46:10 +0300
committerJens Axboe <axboe@kernel.dk>2017-10-13 17:34:57 +0300
commit2942f50fa389a62865572452dce6214a8aed69dc (patch)
treeaa2aad3383d32c0eb5b115d05469b406f5c4db95 /drivers/lightnvm/pblk-core.c
parente72ec1d31bcb6dffe325418c6d96f2fcab7c2654 (diff)
downloadlinux-2942f50fa389a62865572452dce6214a8aed69dc.tar.xz
lightnvm: pblk: remove checks on mempool alloc.
As part of the mempool audit on pblk, remove unnecessary mempool allocation checks on mempools. Reported-by: Jens Axboe <axboe@kernel.dk> Signed-off-by: Javier González <javier@cnexlabs.com> Signed-off-by: Matias Bjørling <m@bjorling.me> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/lightnvm/pblk-core.c')
-rw-r--r--drivers/lightnvm/pblk-core.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/drivers/lightnvm/pblk-core.c b/drivers/lightnvm/pblk-core.c
index 215aadb84c6e..0da58869006b 100644
--- a/drivers/lightnvm/pblk-core.c
+++ b/drivers/lightnvm/pblk-core.c
@@ -206,8 +206,6 @@ int pblk_bio_add_pages(struct pblk *pblk, struct bio *bio, gfp_t flags,
for (i = 0; i < nr_pages; i++) {
page = mempool_alloc(pblk->page_bio_pool, flags);
- if (!page)
- goto err;
ret = bio_add_pc_page(q, bio, page, PBLK_EXPOSED_PAGE_SIZE, 0);
if (ret != PBLK_EXPOSED_PAGE_SIZE) {
@@ -1653,8 +1651,6 @@ void pblk_gen_run_ws(struct pblk *pblk, struct pblk_line *line, void *priv,
struct pblk_line_ws *line_ws;
line_ws = mempool_alloc(pblk->gen_ws_pool, gfp_mask);
- if (!line_ws)
- return;
line_ws->pblk = pblk;
line_ws->line = line;