diff options
author | Ingo Molnar <mingo@kernel.org> | 2018-07-25 12:47:02 +0300 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2018-07-25 12:47:02 +0300 |
commit | 93081caaaed6a40a4f6d9b7ba3f581a4bb1d4404 (patch) | |
tree | f574201ba58ddf9e6264f463e613066cfc8532ba /drivers/media/rc/bpf-lirc.c | |
parent | 788faab70d5a882693286b8d5022779559c79904 (diff) | |
parent | 7f635ff187ab6be0b350b3ec06791e376af238ab (diff) | |
download | linux-93081caaaed6a40a4f6d9b7ba3f581a4bb1d4404.tar.xz |
Merge branch 'perf/urgent' into perf/core, to pick up fixes
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'drivers/media/rc/bpf-lirc.c')
-rw-r--r-- | drivers/media/rc/bpf-lirc.c | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/drivers/media/rc/bpf-lirc.c b/drivers/media/rc/bpf-lirc.c index 40826bba06b6..fcfab6635f9c 100644 --- a/drivers/media/rc/bpf-lirc.c +++ b/drivers/media/rc/bpf-lirc.c @@ -207,29 +207,19 @@ void lirc_bpf_free(struct rc_dev *rcdev) bpf_prog_array_free(rcdev->raw->progs); } -int lirc_prog_attach(const union bpf_attr *attr) +int lirc_prog_attach(const union bpf_attr *attr, struct bpf_prog *prog) { - struct bpf_prog *prog; struct rc_dev *rcdev; int ret; if (attr->attach_flags) return -EINVAL; - prog = bpf_prog_get_type(attr->attach_bpf_fd, - BPF_PROG_TYPE_LIRC_MODE2); - if (IS_ERR(prog)) - return PTR_ERR(prog); - rcdev = rc_dev_get_from_fd(attr->target_fd); - if (IS_ERR(rcdev)) { - bpf_prog_put(prog); + if (IS_ERR(rcdev)) return PTR_ERR(rcdev); - } ret = lirc_bpf_attach(rcdev, prog); - if (ret) - bpf_prog_put(prog); put_device(&rcdev->dev); |