diff options
author | Johannes Berg <johannes.berg@intel.com> | 2024-03-28 12:06:36 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-06-16 14:32:23 +0300 |
commit | 4d5ef7facea11462a2b74e6857bd568e2fdb19e3 (patch) | |
tree | ef5a49493a57674ac421f5de2c4e3e03425ec435 /arch | |
parent | 351d1a64544944b44732f6a64ed65573b00b9e14 (diff) | |
download | linux-4d5ef7facea11462a2b74e6857bd568e2fdb19e3.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.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/um/drivers/vector_kern.c b/arch/um/drivers/vector_kern.c index fc662f7cc2af..c10432ef2d41 100644 --- a/arch/um/drivers/vector_kern.c +++ b/arch/um/drivers/vector_kern.c @@ -142,7 +142,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; } |