Skip to content

Commit 584ed2f

Browse files
jmberg-intelrichardweinberger
authored andcommitted
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: 9807019 ("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>
1 parent e3cce8d commit 584ed2f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

arch/um/drivers/vector_kern.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ static bool get_bpf_flash(struct arglist *def)
141141

142142
if (allow != NULL) {
143143
if (kstrtoul(allow, 10, &result) == 0)
144-
return (allow > 0);
144+
return result > 0;
145145
}
146146
return false;
147147
}

0 commit comments

Comments
 (0)