diff options
author | Wolfram Sang <wsa@the-dreams.de> | 2018-07-17 10:03:42 +0200 |
---|---|---|
committer | Wolfram Sang <wsa@the-dreams.de> | 2018-07-17 10:03:42 +0200 |
commit | 08948b75939f72bd013699963cc7187f25197653 (patch) | |
tree | 5fea43325a7cc2d94620ebeacab31c9c505af281 /drivers/media | |
parent | fb2896a77989314ea89d89c3bdfee93002a760c9 (diff) | |
parent | 9d3cce1e8b8561fed5f383d22a4d6949db4eadbe (diff) | |
download | linux-08948b75939f72bd013699963cc7187f25197653.tar.gz linux-08948b75939f72bd013699963cc7187f25197653.tar.bz2 linux-08948b75939f72bd013699963cc7187f25197653.zip |
Merge tag 'v4.18-rc5' into i2c/for-4.19
Linux 4.18-rc5
Diffstat (limited to 'drivers/media')
-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); |