summaryrefslogtreecommitdiff
path: root/arch/um/drivers/vector_kern.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/um/drivers/vector_kern.c')
-rw-r--r--arch/um/drivers/vector_kern.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/arch/um/drivers/vector_kern.c b/arch/um/drivers/vector_kern.c
index dc2feae789cb..4279793b11b7 100644
--- a/arch/um/drivers/vector_kern.c
+++ b/arch/um/drivers/vector_kern.c
@@ -141,7 +141,7 @@ static bool get_bpf_flash(struct arglist *def)
if (allow != NULL) {
if (kstrtoul(allow, 10, &result) == 0)
- return (allow > 0);
+ return result > 0;
}
return false;
}
@@ -712,11 +712,9 @@ static struct vector_device *find_device(int n)
static int vector_parse(char *str, int *index_out, char **str_out,
char **error_out)
{
- int n, len, err;
+ int n, err;
char *start = str;
- len = strlen(str);
-
while ((*str != ':') && (strlen(str) > 1))
str++;
if (*str != ':') {