Browse Source

cxl: remove a dead branch

In commit 14baf4d9c739 ("cxl: Add guest-specific code") the following code
was added:

	if (afu->crs_len < 0) {
		dev_err(&afu->dev, "Unexpected configuration record size value\n");
		return -EINVAL;
	}

However the variable `crs_len` is of type u64 and cannot be compared < 0.
Remove the dead code section. Fix the following warning treated as error
with W=1:

../drivers/misc/cxl/guest.c:919:19: error: comparison of unsigned expression < 0 is always false [-Werror=type-limits]

Signed-off-by: Mathieu Malaterre <malat@debian.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Mathieu Malaterre 7 years ago
parent
commit
e4ecafb14f
1 changed files with 0 additions and 5 deletions
  1. 0 5
      drivers/misc/cxl/guest.c

+ 0 - 5
drivers/misc/cxl/guest.c

@@ -913,11 +913,6 @@ static int afu_properties_look_ok(struct cxl_afu *afu)
 		return -EINVAL;
 	}
 
-	if (afu->crs_len < 0) {
-		dev_err(&afu->dev, "Unexpected configuration record size value\n");
-		return -EINVAL;
-	}
-
 	return 0;
 }