summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2024-03-28 12:06:36 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-06-16 14:39:43 +0300
commit90bfce05a370fcad16ffc992fb71f97b1523ef15 (patch)
tree645155f49067239cdf02ef0f30ce960bf9e7d9dc /arch
parent31960d991e43c8d6dc07245f19fc13398e90ead2 (diff)
downloadlinux-90bfce05a370fcad16ffc992fb71f97b1523ef15.tar.xz
um: vector: fix bpfflash parameter evaluation
[ Upstream commit 584ed2f76ff5fe360d87a04d17b6520c7999e06b ] 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> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'arch')
-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 45a4bcd27a39..310fb14a85f7 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;
}