Skip to contentSkip to conversation

dm ebs: avoid double unlikely() notation when using IS_ERR()

PATCH New Antonio Quartulli 1 participant 1 message Dec 10, 2020 Device mapper

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 dm ebs: avoid double unlikely() notation when using IS_ERR()

The definition of IS_ERR() already applies the unlikely() notation when checking the error status of the passed pointer. For this reason there is no need to have the same notation outside of IS_ERR() itself.

Clean up code by removing redundant notation.

---
 drivers/md/dm-ebs-target.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/md/dm-ebs-target.c +1 -1
index cb85610527c2..55bcfb74f51f 100644
@@ -86,7 +86,7 @@ static int __ebs_rw_bvec(struct ebs_c *ec, int rw, struct bio_vec *bv, struct bv
 		else
 			ba = dm_bufio_new(ec->bufio, block, &b);
 
-		if (unlikely(IS_ERR(ba))) {
+		if (IS_ERR(ba)) {
 			/*
 			 * Carry on with next buffer, if any, to issue all possible
 			 * data but return error.
Signature · 1 line
2.29.2