summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--kernel/bpf/offload.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/kernel/bpf/offload.c b/kernel/bpf/offload.c
index 52c5617e3716..54cf2b9c44a4 100644
--- a/kernel/bpf/offload.c
+++ b/kernel/bpf/offload.c
@@ -130,9 +130,10 @@ int bpf_prog_offload_verifier_prep(struct bpf_prog *prog)
down_read(&bpf_devs_lock);
offload = prog->aux->offload;
- if (offload)
+ if (offload) {
ret = offload->offdev->ops->prepare(prog);
- offload->dev_state = !ret;
+ offload->dev_state = !ret;
+ }
up_read(&bpf_devs_lock);
return ret;