[PATCH 1/2] target: iblock: drop the dead kmap() NULL check
From: shao.mingyin
Date: Thu Nov 05 2026 - 06:36:33 EST
From: Shao Mingyin <shao.mingyin@xxxxxxxxxx>
kmap() never returns NULL, so the check after it is dead code.
No functional change.
Signed-off-by: Shao Mingyin <shao.mingyin@xxxxxxxxxx>
---
diff --git a/drivers/target/target_core_iblock.c b/drivers/target/target_core_iblock.c
index ea65d39fef88..604fca959f2e 100644
--- a/drivers/target/target_core_iblock.c
+++ b/drivers/target/target_core_iblock.c
@@ -461,8 +461,6 @@ iblock_execute_zero_out(struct block_device *bdev, struct se_cmd *cmd)
int ret;
buf = kmap(sg_page(sg)) + sg->offset;
- if (!buf)
- return TCM_LOGICAL_UNIT_COMMUNICATION_FAILURE;
/*
* Fall back to block_execute_write_same() slow-path if
* incoming WRITE_SAME payload does not contain zeros.