summaryrefslogtreecommitdiffstats
path: root/drivers/misc
diff options
context:
space:
mode:
authorMathieu Malaterre <malat@debian.org>2018-03-22 22:05:28 +0100
committerMichael Ellerman <mpe@ellerman.id.au>2018-08-10 22:12:36 +1000
commite4ecafb14fd9cd77d8f4320af1922e700db56d2b (patch)
treefca132108014a9a5cb02c1e70b34c3ec1994e0ed /drivers/misc
parent2fff0f07b8441a481eb5fc0bfcd0e46d6dbd90db (diff)
downloadlinux-e4ecafb14fd9cd77d8f4320af1922e700db56d2b.tar.bz2
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>
Diffstat (limited to 'drivers/misc')
-rw-r--r--drivers/misc/cxl/guest.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/drivers/misc/cxl/guest.c b/drivers/misc/cxl/guest.c
index f5dc740fcd13..3bc0c15d4d85 100644
--- a/drivers/misc/cxl/guest.c
+++ b/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;
}