mirror of
https://github.com/torvalds/linux
synced 2024-11-05 18:23:50 +00:00
test_bpf: Fix NULL vs IS_ERR() check in test_skb_segment()
The skb_segment() function returns error pointers on error. It never
returns NULL.
Fixes: 76db8087c4
("net: bpf: add a test for skb_segment in test_bpf module")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Daniel Borkmann <daniel@iogearbox.net>
Reviewed-by: Yonghong Song <yhs@fb.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
981f1f8035
commit
99fe29d3a2
1 changed files with 1 additions and 1 deletions
|
@ -6649,7 +6649,7 @@ static __init int test_skb_segment(void)
|
|||
}
|
||||
|
||||
segs = skb_segment(skb, features);
|
||||
if (segs) {
|
||||
if (!IS_ERR(segs)) {
|
||||
kfree_skb_list(segs);
|
||||
ret = 0;
|
||||
pr_info("%s: success in skb_segment!", __func__);
|
||||
|
|
Loading…
Reference in a new issue