summaryrefslogtreecommitdiff
path: root/drivers/lightnvm/pblk-read.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-read.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-read.c')
-rw-r--r--drivers/lightnvm/pblk-read.c8
1 files changed, 0 insertions, 8 deletions
diff --git a/drivers/lightnvm/pblk-read.c b/drivers/lightnvm/pblk-read.c
index 402c732f0970..d2b6e2a7d7d5 100644
--- a/drivers/lightnvm/pblk-read.c
+++ b/drivers/lightnvm/pblk-read.c
@@ -168,10 +168,6 @@ static int pblk_fill_partial_read_bio(struct pblk *pblk, struct nvm_rq *rqd,
DECLARE_COMPLETION_ONSTACK(wait);
new_bio = bio_alloc(GFP_KERNEL, nr_holes);
- if (!new_bio) {
- pr_err("pblk: could not alloc read bio\n");
- return NVM_IO_ERR;
- }
if (pblk_bio_add_pages(pblk, new_bio, GFP_KERNEL, nr_holes))
goto err;
@@ -321,10 +317,6 @@ int pblk_submit_read(struct pblk *pblk, struct bio *bio)
bitmap_zero(&read_bitmap, nr_secs);
rqd = pblk_alloc_rqd(pblk, READ);
- if (IS_ERR(rqd)) {
- pr_err_ratelimited("pblk: not able to alloc rqd");
- return NVM_IO_ERR;
- }
rqd->opcode = NVM_OP_PREAD;
rqd->bio = bio;