Commit 5a6690b
bpf: Fix unsigned 'datasec_id' compared with zero in check_pseudo_btf_id
The unsigned variable datasec_id is assigned a return value from the call
to check_pseudo_btf_id(), which may return negative error code.
Fixes coccicheck warning:
./kernel/bpf/verifier.c:9616:5-15: WARNING: Unsigned expression compared with zero: datasec_id > 0
Reported-by: Tosk Robot <tencent_os_robot@tencent.com>
Signed-off-by: Kaixu Xia <kaixuxia@tencent.com>1 parent ccf8d80 commit 5a6690b
1 file changed
+2
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9585 | 9585 | | |
9586 | 9586 | | |
9587 | 9587 | | |
9588 | | - | |
9589 | 9588 | | |
9590 | 9589 | | |
9591 | 9590 | | |
9592 | 9591 | | |
9593 | 9592 | | |
| 9593 | + | |
| 9594 | + | |
9594 | 9595 | | |
9595 | 9596 | | |
9596 | 9597 | | |
| |||
0 commit comments