Skip to content

Commit

Permalink
NVMe: Remove check for null
Browse files Browse the repository at this point in the history
Checking fails static analysis due to additional arithmetic prior to
the NULL check. Mapping doesn't return NULL here anyway, so removing
the check.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Keith Busch <keith.busch@intel.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
  • Loading branch information
Keith Busch authored and Jens Axboe committed Apr 8, 2015
1 parent c727040 commit 4472280
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions drivers/block/nvme-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -517,8 +517,6 @@ static void nvme_dif_remap(struct request *req,
return;

pmap = kmap_atomic(bip->bip_vec->bv_page) + bip->bip_vec->bv_offset;
if (!pmap)
return;

p = pmap;
virt = bip_get_seed(bip);
Expand Down

0 comments on commit 4472280

Please sign in to comment.