summaryrefslogtreecommitdiff
path: root/arch/um
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2024-03-28 12:06:36 +0300
committerRichard Weinberger <richard@nod.at>2024-04-22 23:28:40 +0300
commit584ed2f76ff5fe360d87a04d17b6520c7999e06b (patch)
treeecf59a02c9fd01f5d5030d404d135eedbc5b4027 /arch/um
parente3cce8d87d6407f83a5741c3c5d54bf1365c6ac6 (diff)
downloadlinux-584ed2f76ff5fe360d87a04d17b6520c7999e06b.tar.xz
um: vector: fix bpfflash parameter evaluation
With W=1 the build complains about a pointer compared to zero, clearly the result should've been compared. Fixes: 9807019a62dc ("um: Loadable BPF "Firmware" for vector drivers") Signed-off-by: Johannes Berg <johannes.berg@intel.com> Reviewed-by: Tiwei Bie <tiwei.btw@antgroup.com> Signed-off-by: Richard Weinberger <richard@nod.at>
Diffstat (limited to 'arch/um')
-rw-r--r--arch/um/drivers/vector_kern.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/um/drivers/vector_kern.c b/arch/um/drivers/vector_kern.c
index dc2feae789cb..63e5f108a6b9 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;
}