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 <[email protected]> Reviewed-by: Tiwei Bie <[email protected]> Signed-off-by: Richard Weinberger <[email protected]>
1 parent e3cce8d commit 584ed2f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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)