Skip to contentSkip to conversation

NVMe: Remove check for null

PATCH New Keith Busch 1 participant 1 message Apr 7, 2015

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 NVMe: Remove check for null

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 at oracle.com>
Signed-off-by Keith Busch <keith.busch at intel.com>
---
 drivers/block/nvme-core.c |    2 --
 1 file changed, 2 deletions(-)
drivers/block/nvme-core.c +0 -2
index ef43278..8729266 100644
@@ -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);
Signature · 1 line
1.7.10.4